Bug 219011 - Provide CFI for the clone() backtrace stopping
Summary: Provide CFI for the clone() backtrace stopping
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 216506
TreeView+ depends on / blocked
 
Reported: 2006-12-09 10:23 UTC by Jan Kratochvil
Modified: 2016-11-24 15:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-10 23:19:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Testcase source (240 bytes, text/plain)
2006-12-09 10:23 UTC, Jan Kratochvil
no flags Details
Patch providing unwindable CFI info for clone() - from upstream/RawHide (840 bytes, patch)
2006-12-09 10:25 UTC, Jan Kratochvil
no flags Details | Diff

Description Jan Kratochvil 2006-12-09 10:23:08 UTC
Description of problem:
Bug 216506 requests proper backtrace stopping on the toplevel clone() glibc
function. Appropriate gdb patch (Bug 216506 Comment 6) would be provided but the
associated CFI info in glibc would be needed.

Otherwise some specific clone() hack can be implemented for gdb

Version-Release number of selected component (if applicable):
glibc-2.3.4-2.25.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. gcc -o threader -ggdb3 -Wall threader.c -pthread
2. gdb ./threader
3. run
4. bt

Actual results:
#5  0x0000003f672c68c3 in clone () from /lib64/tls/libc.so.6
#6  0x0000000000000000 in ?? ()
(gdb) _

Expected results:
#5  0x0000003f672c68c3 in clone () from /lib64/tls/libc.so.6
(gdb) _

Additional info:
jakub: Is it fine to backport for glibc the RawHide glibc-2.5-11.x86_64/upstream
patch? Patch for RHEL-4 resticted only for x86_64 as gdb stops for other reason
on i386 (checked it is a different reason but did not analyse why specifically):

2006-11-30  Jan Kratochvil  <jan.kratochvil>

        * sysdeps/unix/sysv/linux/x86_64/clone.S: Provide CFI for the outermost
        `clone' function to ensure proper unwinding stop of gdb.


With the gdb patch of Attachment 143206 [details] this glibc patch will provide the final
proper unwind as in the current RawHide with glibc-2.5.90-11.x86_64.

Comment 1 Jan Kratochvil 2006-12-09 10:23:08 UTC
Created attachment 143207 [details]
Testcase source

Comment 2 Jan Kratochvil 2006-12-09 10:25:14 UTC
Created attachment 143208 [details]
Patch providing unwindable CFI info for clone() - from upstream/RawHide

Comment 3 Jan Kratochvil 2006-12-10 22:52:36 UTC
As libunwind already needed a patch for its assertion fail in RawHide glibc
http://sources.redhat.com/cgi-bin/cvsweb.cgi/frysk-imports/libunwind/src/dwarf/Gparser.c.diff?r1=1.3&r2=1.4&cvsroot=frysk

I believe it is not appropriate for RHEL-4 as it changes (CFI) glibc ABI.

Fine to get it denied, just to get it confirmed you also believe it is the right
way.

Going to patch some hack in gdb(1) for the specific `clone' function instead.


Comment 4 Jakub Jelinek 2006-12-10 23:19:55 UTC
Yeah, I think this isn't appropriate for RHEL4.


Note You need to log in before you can comment on or make changes to this bug.