This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 130254 - glibc's traceback() fails when called from an exception handler
glibc's traceback() fails when called from an exception handler
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
3.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-18 11:22 EDT by Ed Connell
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-20 13:14:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
C program that fails on ia64 (744 bytes, text/plain)
2004-08-18 11:24 EDT, Ed Connell
no flags Details

  None (edit)
Description Ed Connell 2004-08-18 11:22:59 EDT
Description of problem:
On ia64, traceback() works fine generally but causes recursive SEGV's 
when called from an exception handler.  On x86 both cases work fine.  
The bug can be observed with a small testcase or with a trivial 
testcase and the /usr/bin/catchsegv script.  I will attach the small 
testcase but include the trivial testcase inline here.

[edconn@order ~/traceppen]$ cat segv.c
int main()
{
  int *ip = (int *)0;
  *ip = 0;

  return 0;
}

[edconn@order ~/traceppen]$ gcc -o segv segv.c -rdynamic -g -funwind-
tables

[edconn@order ~/traceppen]$ catchsegv ./segv
*** Segmentation fault

Backtrace:
*** Segmentation fault
 .
 .
 .


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

How reproducible:
Every time.

Steps to Reproduce:
1. gcc -o toy toy.c -rdynamic -g -funwind-tables
2. ./toy
  
Actual results:
[edconn@order ~/traceppen]$ ./toy 
Caught SEGV. Code is 2.
Caught SEGV. Code is 1.
Caught SEGV. Code is 1.
Caught SEGV. Code is 1.
Caught SEGV. Code is 1.
Caught SEGV. Code is 1.
./toy(print_trace+0x40) [0x4000000000000f20]
./toy(segv_hand+0xa0) [0x4000000000000ec0]
[0xa0000000000040c0]
/lib/libgcc_s.so.1 [0x20000000002fda41]
/lib/libgcc_s.so.1 [0x20000000002fdf20]
/lib/libgcc_s.so.1(_Unwind_Backtrace+0x300) [0x20000000002ffc30]
/lib/tls/libc.so.6.1(backtrace+0x110) [0x200000000023f700]
./toy(print_trace+0x40) [0x4000000000000f20]
./toy(segv_hand+0xa0) [0x4000000000000ec0]
[0xa0000000000040c0]
/lib/libgcc_s.so.1 [0x20000000002fda41]
/lib/libgcc_s.so.1 [0x20000000002fdf20]
 .
 .
 .


Expected results:
edconn@chaos% ./toy 
Caught SEGV. Code is 1.
./toy(print_trace+0x1a) [0x80486e2]
./toy(segv_hand+0x21) [0x80486bd]
./toy [0x42028c40]
./toy(__libc_start_main+0xa4) [0x420158d4]
./toy(backtrace_symbols+0x31) [0x804860d]


Additional info:
Comment 1 Ed Connell 2004-08-18 11:24:18 EDT
Created attachment 102843 [details]
C program that fails on ia64
Comment 2 Jakub Jelinek 2004-10-08 07:41:29 EDT
gcc -g -o toy toy.c -Wl,--export-dynamic; ./toy; echo $?; rpm -q gcc glibc libgcc
Caught SEGV. Code is 2.
./toy(print_trace+0x40) [0x4000000000000f00]
./toy(segv_hand+0xa0) [0x4000000000000ea0]
[0xa0000000000040c0]
./toy(main+0xc1) [0x4000000000001151]
/lib/tls/libc.so.6.1(__libc_start_main+0x440) [0x200000000007e990]
./toy(_start+0x80) [0x4000000000000c80]

0
gcc-3.2.3-43
glibc-2.3.2-95.28
libgcc-3.2.3-43

catchsegv is still broken on IA-64, it doesn't use backtrace() internally
(but it should).
Comment 3 Jakub Jelinek 2004-10-15 01:19:10 EDT
catchseg should be fixed in rawhide glibc, eventually will be backported
to RHEL3 glibc too.
Comment 4 Jakub Jelinek 2004-10-22 13:43:02 EDT
catchsegv fixed in glibc-2.3.2-95.30.
Comment 5 John Flanagan 2004-12-20 13:14:19 EST
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.

http://rhn.redhat.com/errata/RHSA-2004-586.html

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