diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-07-17 09:37:35 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-07-17 09:38:56 -0400 |
commit | ea14cf671a7ad543ad4752b301883789ab86f70f (patch) | |
tree | 7941d341f0c87b8d5c44432643fef2e9fbdc67ab /tapsets.cxx | |
parent | 5a80613abf2b6e0d50575fcacebb92f415ab2d0f (diff) | |
download | systemtap-steved-ea14cf671a7ad543ad4752b301883789ab86f70f.tar.gz systemtap-steved-ea14cf671a7ad543ad4752b301883789ab86f70f.tar.xz systemtap-steved-ea14cf671a7ad543ad4752b301883789ab86f70f.zip |
PR3498 cont'd: better tolerate missing modules
* tapsets.cxx (get_{user,kern}_dw): Skip partially allocated (0-initialized)
FOO_dw[] slots that may result from dwflpp::ctor exceptions.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index f629d08c..4ef5ade6 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -594,15 +594,15 @@ struct dwarf_builder: public derived_probe_builder dwflpp *get_kern_dw(systemtap_session& sess, const string& module) { - if (kern_dw.find(module) == kern_dw.end()) - kern_dw[module] = new dwflpp(sess, module, true); + if (kern_dw[module] == 0) + kern_dw[module] = new dwflpp(sess, module, true); // might throw return kern_dw[module]; } dwflpp *get_user_dw(systemtap_session& sess, const string& module) { - if (user_dw.find(module) == user_dw.end()) - user_dw[module] = new dwflpp(sess, module, false); + if (user_dw[module] == 0) + user_dw[module] = new dwflpp(sess, module, false); // might throw return user_dw[module]; } |