This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/39291] New: _Unwind_Backtrace fails.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2009 14:38:06 -0000
- Subject: [Bug middle-end/39291] New: _Unwind_Backtrace fails.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
during porting some software to mingw i've noticed that
unwind_backtrace has some problems. i've tested it with
sjlj and dw2 variant. here're results:
D:\src\mingw-unwind>u-sjlj.exe
foo:enter
bar:enter
zoo:enter
boom!
signalHandler:enter
D:\src\mingw-unwind>u-dw2.exe
foo:enter
bar:enter
zoo:enter
boom!
signalHandler:enter
lookupSymbol: 00401887
lookupSymbol: 0040166A
signalHandler:longjmp
as far i can see both tests got a sigsegv:
Starting program: D:\src\mingw-unwind/u-sjlj.exe
[New thread 2180.0x1c0]
Error: dll starting at 0x77d40000 not found.
Error while mapping shared library sections:
NOT_AN_IMAGE: No such file or directory.
Error while mapping shared library sections:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory.
Error: dll starting at 0x77d40000 not found.
Error: dll starting at 0x77c20000 not found.
foo:enter
bar:enter
zoo:enter
boom!
Program received signal SIGSEGV, Segmentation fault.
0x0040184f in zoo () at u.c:36
36 *p = 0;
(gdb) c
Continuing.
signalHandler:enter
Program received signal SIGSEGV, Segmentation fault.
0x00402378 in _Unwind_GetIP ()
(gdb) bt
#0 0x00402378 in _Unwind_GetIP ()
#1 0x004017bc in helper (ctx=0x22fa44, data=0x0) at u.c:14
#2 0x00402b31 in _Unwind_Backtrace ()
#3 0x004017f7 in signalHandler (signalNumber=11) at u.c:24
#4 0x0040166a in _gnu_exception_handler@4 ()
#5 0x00401711 in __mingw_vex ()
#6 0x7d64dbcb in ?? ()
#7 0x0022fad8 in ?? ()
#8 0x0022fb84 in ?? ()
#9 0x0022fb84 in ?? ()
#10 0x003f24f4 in ?? ()
#11 0x0022fb84 in ?? ()
#12 0x0022fbd4 in ?? ()
#13 0x00000000 in ?? ()
Starting program: D:\src\mingw-unwind/u-dw2.exe
[New thread 1308.0x8c8]
Error: dll starting at 0x77d40000 not found.
Error while mapping shared library sections:
NOT_AN_IMAGE: No such file or directory.
Error while mapping shared library sections:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory.
Error: dll starting at 0x77d40000 not found.
Error: dll starting at 0x77c20000 not found.
foo:enter
bar:enter
zoo:enter
boom!
Program received signal SIGSEGV, Segmentation fault.
0x004018df in zoo () at u.c:36
36 *p = 0;
(gdb) c
Continuing.
signalHandler:enter
lookupSymbol: 00401887
lookupSymbol: 0040166A
signalHandler:longjmp
Program received signal SIGSEGV, Segmentation fault.
0x00409465 in initialized ()
(gdb) bt
#0 0x00409465 in initialized ()
#1 0x004018a7 in signalHandler (signalNumber=11) at u.c:26
#2 0x0040166a in _gnu_exception_handler@4 ()
#3 0x00401711 in __mingw_vex ()
#4 0x7d64dbcb in ?? ()
#5 0x0022fad8 in ?? ()
#6 0x0022fb84 in ?? ()
#7 0x0022fb84 in ?? ()
#8 0x003f24f4 in ?? ()
#9 0x0022fb84 in ?? ()
#10 0x0022fbd4 in ?? ()
#11 0x00000000 in ?? ()
of course on linux it works perfectly.
testcases were built with 4.4.0-20090220 and latest minw64 crt from svn.
--
Summary: _Unwind_Backtrace fails.
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC build triplet: x86_64-gnu-linux
GCC host triplet: x86_64-gnu-linux
GCC target triplet: i486-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39291