Bug 867913
| Summary: | Assertion `dwarf_tag(cu_die) == DW_TAG_compile_unit || dwarf_tag(cu_die) == DW_TAG_type_unit' failed. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Roman Rakus <rrakus> |
| Component: | systemtap | Assignee: | Mark Wielaard <mjw> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 18 | CC: | dsmith, fche, jistone, lberk, mjw, mjw, nathans, scox, tsmetana, wcohen |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-04-26 12:37:48 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The core issue is that systemtap dwflpp.cxx isn't expecting a DW_TAG_partial_unit which dwz generates now.
Simplest patch seems to be:
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 5e27577..7921c99 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -1081,7 +1081,13 @@ dwflpp::iterate_over_globals (Dwarf_Die *cu_die,
{
assert (cu_die);
assert (dwarf_tag(cu_die) == DW_TAG_compile_unit
- || dwarf_tag(cu_die) == DW_TAG_type_unit);
+ || dwarf_tag(cu_die) == DW_TAG_type_unit
+ || dwarf_tag(cu_die) == DW_TAG_partial_unit);
+
+ // Ignore partial_unit, if they get imported by a real unit, then
+ // iterate_over_types will traverse them.
+ if (dwarf_tag(cu_die) == DW_TAG_partial_unit)
+ return DWARF_CB_OK;
// If this is C++, recurse for any inner types
bool has_inner_types = dwarf_srclang(cu_die) == DW_LANG_C_plus_plus;
@@ -1120,6 +1126,9 @@ dwflpp::iterate_over_types (Dwarf_Die *top_die,
case DW_TAG_namespace:
rc = (*callback)(&die, has_inner_types, prefix, data);
break;
+ case DW_TAG_imported_unit:
+ rc = iterate_over_types(&die, has_inner_types, prefix, callback, data);
+ break;
}
while (rc == DWARF_CB_OK && dwarf_siblingof(&die, &die) == 0);
But there are a couple of other places where dwflpp.cxx does manual dwarf_child/dwarf_siblingof traversal which might need to account for DW_TAG_imported_unit.
There is more to it than the part in comment #1. See upstream bug/commit for a more complete fix: http://sourceware.org/bugzilla/show_bug.cgi?id=14742 |
Description of problem: When trying to use: # stap -e 'probe process("/usr/lib64/cmpi/libcmpiCura_Account.so").function("*") { println(probefunc()); println($$parms$$) }' I got the $Summary Version-Release number of selected component (if applicable): # stap -V Systemtap translator/driver (version 2.0/0.155, rpm 2.0-1.fc18) Copyright (C) 2005-2012 Red Hat, Inc. and others This is free software; see the source for copying conditions. enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS DYNINST