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 runtime/12141] Segmentation fault in apps probed by libstdc++ i686


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

--- Comment #3 from Josh Stone <jistone at redhat dot com> 2010-10-25 21:38:42 UTC ---
Some additional insight from chatting with fche on IRC...

The 0x277a address difference between stap and gdb includes gdb's prologue
searching.  In both cases, this is an offset 0x1a into the function, so the
real difference between stap and gdb's notion of function start is 0x2760.

Now for a little numerology:

> $ eu-readelf -S /usr/lib/libstdc++.so.6.0.13 | grep text
> [12] .text                PROGBITS     00b58610 045610 072a88  0 AX     0   0 16
> $ eu-readelf -S /usr/lib/debug/usr/lib/libstdc++.so.6.0.13.debug | grep text
> [12] .text                NOBITS       00042eb0 000160 072a88  0 AX     0   0 16
> $ python -c 'print(hex(0x45610 - 0x42eb0))'
> 0x2760

For comparison, the working x86_64 has no difference in those numbers:

> $ eu-readelf -S /usr/lib64/libstdc++.so.6.0.13 | grep text
> [12] .text                PROGBITS     0000003b706563f0 000563f0 0006d006  0 AX     0   0 16
> $ eu-readelf -S /usr/lib/debug/usr/lib64/libstdc++.so.6.0.13.debug | grep text
> [12] .text                NOBITS       00000000000563f0 00000230 0006d006  0 AX     0   0 16

It appears that prelink is responsible for this shift, although only on i686. 
Examining the virgin file from the rpm, or even doing prelink -u, gets the
address back to matching what's in the debuginfo:

> $ eu-readelf -S ~/libstdc++-4.4.4-10.fc13.i686/usr/lib/libstdc++.so.6.0.13 | grep text
> [12] .text                PROGBITS     00042eb0 042eb0 072a88  0 AX     0   0 16

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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