This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc 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 libc/595] New: x86 syscall stubs are missing unwind info


This is a followup to the mail posted here:

 http://sources.redhat.com/ml/libc-hacker/2004-11/msg00057.html

In the meantime, I confirmed that the problem is indeed in libc and not in the
toolchain I was using.  Specifically, I built the glibc tree (as of a few days
ago) and verified that the attached patch fixes the problem with unwinding
across the kill() system-call stub.  The patch is most likely incomplete but I
hope it would still be a useful starting-point if somebody wants to fix this for
real. I should mention that the unwind-info for the open system-call stub looked
rather strange, but I didn't try to sort out what was going on there (it's
possible I misread the unwind-info).

An easy way to reproduce this problem is to run:

 $ tests/Gtest-bt -v

in the libunwind package.  Without the unwind-info for kill(), the backtraces
which cross a signal-handler fail to show the stack-frame for "main()" (they
skip from "kill()" directly to __libc_start_main()).  For example, here is the
portion of an incorrect trace:

0000000041041b16 <kill+0x16>                      (sp=00000000bffff83c)
        proc=41041b16-41041b17
        handler=0 lsda=0 gp=0
000000004102e900 <__libc_start_main+0xf0>         (sp=00000000bffff900)
        proc=4102e900-4102e901
        handler=0 lsda=0 gp=0

and here is what it should look like:

00000000b7ee6906 <kill+0x16>                      (sp=00000000bffff7ac)
        proc=b7ee68f0-b7ee692e
        handler=0 lsda=0 gp=b7fdabe4
00000000080496f9 <main+0x1bc>                     (sp=00000000bffff7b0)
        proc=80496f9-80496fa
        handler=0 lsda=0 gp=0
00000000b7ed3444 <__libc_start_main+0xe4>         (sp=00000000bffff870)
        proc=b7ed3444-b7ed3445
        handler=0 lsda=0 gp=0

-- 
           Summary: x86 syscall stubs are missing unwind info
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: davidm at hpl dot hp dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i386-linux
  GCC host triplet: i386-linux
GCC target triplet: i386-linux


http://sources.redhat.com/bugzilla/show_bug.cgi?id=595

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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