This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/9883] static markers in userspace libraries segfaults


------- Additional Comments From mjw at redhat dot com  2009-02-23 16:57 -------
Seems, we forget to check whether the die has any children to begin with in
tapsets.cxx (iterate_over_cu_labels)

Testing following fix:

diff --git a/tapsets.cxx b/tapsets.cxx
index 78d5a5b..5d9d062 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1330,7 +1330,10 @@ struct dwflpp
 
     const char * sym = label_val.c_str();
     Dwarf_Die die;
-    dwarf_child (cu, &die);
+    int res = dwarf_child (cu, &die);
+    if (res != 0)
+      return;  // die without children, bail out.
+
     static string function_name;
     do 
       {


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |mjw at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=9883

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]