]> sourceware.org Git - systemtap.git/commitdiff
PR3498 cont'd: better tolerate missing modules
authorFrank Ch. Eigler <fche@elastic.org>
Fri, 17 Jul 2009 13:37:35 +0000 (09:37 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Fri, 17 Jul 2009 13:38:56 +0000 (09:38 -0400)
* tapsets.cxx (get_{user,kern}_dw): Skip partially allocated (0-initialized)
  FOO_dw[] slots that may result from dwflpp::ctor exceptions.

tapsets.cxx

index f629d08c0953d3988455fc3c48a08dcb51aaab71..4ef5ade6312d45f7e5385815e12637eab2d6dabb 100644 (file)
@@ -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];
   }
 
This page took 0.031628 seconds and 5 git commands to generate.