Re: [Boost-users] [boost] bug in signals library? - segmentation fault (onlylinked) -> exit(11) called
Hi, Strange - the segmentation fault disappears if I link with the debug-version of libboost_signals (-lboost_signals-gcc-d-1_33_1)! It seams to me that some assert statements contain required code (removed in release version if signals)?!
I get an segmentation fault if I try to link against libboost_signals-gcc-1_33_1 or libboost_signals-gcc-mt-1_33_1! The application consist only of an empty main function and the binary is linked against the signals library. I've appended an output (tusc.out) of tusc (trace unix system calls) which indicates, that exit(11) is called and so a core dump created.
Can you run the program under gdb debugger, and when hittin segfault produce backtrace with the "backtrace" command. That will be more usefull, in any case, then syscall trace.
I'm not familiar with gdb! What I did (hopefully correct):
[src]$ /opt/langtools/bin/gdb32 test
HP gdb 5.2 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00
and target hppa1.1-hp-hpux11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.2 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for
warranty/support.
..
(gdb) run
Starting program: /eda-home/kowalke/Projects/test/debug/src/test
Program received signal SIGSEGV, Segmentation fault
si_code: 0 - SEGV_UNKNOWN - Unknown Error.
0xc0017cd8 in
On Dec 23, 2005, at 6:31 AM,
Hi, Strange - the segmentation fault disappears if I link with the debug-version of libboost_signals (-lboost_signals-gcc-d-1_33_1)!
That's *really* weird. Signals doesn't keep any static data around, so it really doesn't do much before main is called.
It seams to me that some assert statements contain required code (removed in release version if signals)?!
Good idea. I looked through the Signals source, but there are no asserts with required code in them.
Program received signal SIGSEGV, Segmentation fault si_code: 0 - SEGV_UNKNOWN - Unknown Error. 0xc0017cd8 in
() (gdb) backtrace #0 0xc0017cd8 in () warning: Attempting to unwind past bad PC 0xc0017cd8 #1 0xc0027400 in () #2 0xc0027400 in () Error accessing memory address 0x3e7: Bad address.
I was hoping that we would at least get a function name :( I'm not even sure where to start debugging this one. Have you run into this kind of problem with other Boost libraries? It's likely a problem with static initialization for some library, but we'd need to figure out which initializer is causing the problem. We might be able to use backtraces from the initializers that are called when linking against the debug library to narrow it down... Doug
participants (2)
-
Douglas Gregor
-
Oliver.Kowalke@infineon.com