[Bug runtime/2738] deref error on ppc64

fche at redhat dot com sourceware-bugzilla@sourceware.org
Mon Jun 12 17:24:00 GMT 2006


------- Additional Comments From fche at redhat dot com  2006-06-12 17:23 -------
Here is the $return tvar extractor function in the attached .c file.

    intptr_t addr;
    { // DWARF expression: 0x73
      {
        intptr_t s0;
        s0 = fetch_register (3) + 0L;
        addr = s0;
      }
    }
    THIS->__retvalue = deref (8, addr);

Compared to the ppc64 retval() function, this does one extra round of
dereference.  According the ppc64 ABI [1], r3 should only be dereferenced
for aggregates/unions/longer character strings.  Integers are returned simply
without indirection.  So here we have an ABI misunderstanding.  It may
be a bug in the new $return code handling (thus cc:ing dsmith), or
inadequacy of the elfutils api for this distinction (thus cc:ing roland).

[1] http://freestandards.org/spec/ELF/ppc64/spec/x280.html#RETURN-VAL


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com,
                   |                            |roland at redhat dot com


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

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



More information about the Systemtap mailing list