This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/18936] script cache will fail if $jiffies is referenced
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 08 Sep 2015 20:53:20 +0000
- Subject: [Bug translator/18936] script cache will fail if $jiffies is referenced
- Auto-submitted: auto-generated
- References: <bug-18936-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18936
Josh Stone <jistone at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jistone at redhat dot com
--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
I found that dwflpp::literal_stmt_for_local is passing the address of stack
variable "addr_loc" into c_translate_location(), which eventually saves that
into loc->ops. By the time this is used by emit_header(), via
express_as_string(), that addr_loc has gone out of scope and is clobbered on
the stack.
If we lift addr_loc to the top of the function, it will live long enough for
emit_header() to comment it correctly.
-- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -3860,6 +3860,7 @@ dwflpp::literal_stmt_for_local (vector<Dwarf_Die>&
scopes,
bool lvalue,
Dwarf_Die *die_mem)
{
+ Dwarf_Op addr_loc;
Dwarf_Die vardie;
Dwarf_Attribute fb_attr_mem, *fb_attr = NULL;
@@ -3890,7 +3891,6 @@ dwflpp::literal_stmt_for_local (vector<Dwarf_Die>&
scopes,
if (dwarf_attr_integrate (&vardie, DW_AT_const_value, &attr_mem) == NULL
&& dwarf_attr_integrate (&vardie, DW_AT_location, &attr_mem) == NULL)
{
- Dwarf_Op addr_loc;
memset(&addr_loc, 0, sizeof(Dwarf_Op));
addr_loc.atom = DW_OP_addr;
// If it is an external variable try the symbol table. PR10622.
Now I get a consistent "// DWARF expression: 0x3(-2118082560)", which is
DW_OP_addr with the relative address.
--
You are receiving this mail because:
You are the assignee for the bug.