Bug 90402 - backtrace() is broken
Summary: backtrace() is broken
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: glibc   
(Show other bugs)
Version: 2.1
Hardware: ia64 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-05-07 17:54 UTC by Johan Walles
Modified: 2016-11-24 15:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-11-14 15:14:00 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
backtrace() example program from the info documentation (658 bytes, text/plain)
2003-05-07 17:55 UTC, Johan Walles
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2003:334 normal SHIPPED_LIVE Low: glibc security update 2003-11-14 05:00:00 UTC

Description Johan Walles 2003-05-07 17:54:16 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210

Description of problem:
Building and compiling the example program from the info documentation doesn'd
produce any backtrace.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Build the backtrace() example program from the info documentation
2. Run it

Actual Results:  (nil): [(nil)]

Expected Results:  I should have gotten a non-nil backtrace of the example program.

Additional info:

Will attach a copy of the example program.

Comment 1 Johan Walles 2003-05-07 17:55:31 UTC
Created attachment 91534 [details]
backtrace() example program from the info documentation

I modified the program slightly to print the address of each function in
addition to the function itself.

Comment 2 Jakub Jelinek 2003-10-03 11:07:57 UTC
Works for me just fine:
$ gcc -g -o test test.c
$ ./test
Obtained 5 stack frames.
0x8048534: ./test(backtrace_symbols+0x124) [0x8048534]
0x80485cb: ./test(backtrace_symbols+0x1bb) [0x80485cb]
0x80485db: ./test(backtrace_symbols+0x1cb) [0x80485db]
0xb74b5687: /lib/i686/libc.so.6(__libc_start_main+0x93) [0xb74b5687]
0x8048441: ./test(backtrace_symbols+0x31) [0x8048441]
$ ./test
$ rpm -q glibc
$ gcc -g -o test test.c -Wl,--export-dynamic
$ ./test
Obtained 5 stack frames.
0x8048734: ./test(print_trace+0x14) [0x8048734]
0x80487cb: ./test(dummy_function+0xb) [0x80487cb]
0x80487db: ./test(main+0xb) [0x80487db]
0xb74b5687: /lib/i686/libc.so.6(__libc_start_main+0x93) [0xb74b5687]
0x8048641: ./test(backtrace_symbols+0x3d) [0x8048641]

(you need --export-dynamic if you want to see the symbols in the binary).

Comment 3 Johan Walles 2003-10-03 11:22:36 UTC
This was filed on ia64.  Your example shows 32-bit addresses.

Could you try this on ia64?

Comment 4 Jakub Jelinek 2003-10-03 13:28:46 UTC
Oops, sorry, missed that.
(not AS2.1 material though, needs GCC 3.2.3-rh or 3.3.1 and later).

Comment 5 Jakub Jelinek 2003-11-14 15:14:00 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.


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