[Bug 898077] Re: backtrace fails with recursive functions on 64bit (BZ #12432)

Bug Watch Updater 898077 at bugs.launchpad.net
Fri Dec 2 08:25:00 UTC 2011


Launchpad has imported 2 comments from the remote bug at
http://sourceware.org/bugzilla/show_bug.cgi?id=12432.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-01-23T21:45:23+00:00 Loose wrote:

Created attachment 5207
Test program that demonstrates wrong backtrace on 64-bit

glibc's backtrace() function fails to give a complete backtrace with 64-bit
code when calling a recursive function. A 32-bit executable does produce a
correct backtrace. Using -fno-omit-frame-pointer does not solve the problem for
the 64-bit code.

This problem still exists with current glibc from git. I built glibc
from git at 2011-01-22 and linked the attached program to the freshly
built libc. I tried both static and dynamic linking; both give wrong
output.

Output of 32-bit executable:
** 12 **
0   0x80484aa
1   0x8048492
2   0x8048492
3   0x8048492
4   0x8048492
5   0x8048492
6   0x8048492
7   0x8048492
8   0x8048492
9   0x8048492
10  0x804850f
11  0xf75bdc0e

Output of 64-bit executable:
** 2 **
0   0x4005c8
1   0x4005b2

Reply at: https://bugs.launchpad.net/eglibc/+bug/898077/comments/0

------------------------------------------------------------------------
On 2011-05-14T14:46:55+00:00 Drepper-fsp wrote:

I've checked in a patch.

Reply at: https://bugs.launchpad.net/eglibc/+bug/898077/comments/1


** Changed in: eglibc
       Status: Unknown => Fix Released

** Changed in: eglibc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/898077

Title:
  backtrace fails with recursive functions on 64bit (BZ #12432)

Status in Embedded GLIBC:
  Fix Released
Status in “eglibc” package in Ubuntu:
  Confirmed

Bug description:
  glibc's backtrace() function fails to give a complete backtrace with
  64-bit code when calling a recursive function. A 32-bit executable
  does produce a correct backtrace. Using -fno-omit-frame-pointer does
  not solve the problem for the 64-bit code.

  This is alredy fixed in (e)glibc 2.14

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

   [BZ #12432]
   * sysdeps/ia64/backtrace.c (struct trace_reg): Add cfa element.
   (dummy_getcfa): New function.
   (init): Get _Unwind_GetCFA address, use dummy if not found.
   (backtrace_helper): In recursion check, also check whether CFA changes.
   (__backtrace): Completely initialize arg.

  I suggest to backport this fix to (e)glibc 2.12/2.13 for ubuntu
  maverick/natty/oneiric.

  The patch has been tested for eglibc_2.12.1-0ubuntu10.2.

To manage notifications about this bug go to:
https://bugs.launchpad.net/eglibc/+bug/898077/+subscriptions




More information about the foundations-bugs mailing list