Bug 61003 - [4.9/4.10 Regression] Segfault in __deregister_frame_info_bases when exiting, on i686-mingw32 with dw2 unwinding
Summary: [4.9/4.10 Regression] Segfault in __deregister_frame_info_bases when exiting,...
Status: RESOLVED DUPLICATE of bug 60830
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcc (show other bugs)
Version: 4.9.1
: P3 critical
Target Milestone: 4.9.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-29 14:28 UTC by Fanael
Modified: 2014-04-30 14:23 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-*-mingw32
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fanael 2014-04-29 14:28:49 UTC
When targeting i686-mingw32 all programs compiled with GCC with DWARF2 unwinding, including GCC itself, segfault when exiting. The segfaults are null pointer references in __deregister_frame_info_bases, called from atexit handler runner.

Tested on 4.9.1 r. 209891. Didn't test the trunk.

Backtrace (from Wine, on real Windows it's very similar):
#0  0x010b7810 in __deregister_frame_info_bases (begin=0x7ed5bb6f <MSVCRT__cexit+127>) at ../../../../src/gcc/libgcc/unwind-dw2-fde.c:216
#1  0x05c2fd38 in ?? ()
#2  0x7ed5bb6f in MSVCRT__cexit () from /usr/bin/../lib32/wine/msvcrt.dll.so
#3  0x7ed5be3e in MSVCRT_exit () from /usr/bin/../lib32/wine/msvcrt.dll.so
#4  0x004014c3 in __tmainCRTStartup ()
#5  0x7b86041c in call_process_entry () from /usr/bin/../lib32/wine/kernel32.dll.so
#6  0x7b861563 in ExitProcess () from /usr/bin/../lib32/wine/kernel32.dll.so
#7  0x7bc80490 in call_thread_func_wrapper () from /usr/bin/../lib32/wine/ntdll.dll.so
#8  0x7bc834cf in call_thread_func () from /usr/bin/../lib32/wine/ntdll.dll.so
#9  0x7bc8046e in RtlRaiseException () from /usr/bin/../lib32/wine/ntdll.dll.so
#10 0x7bc53931 in call_dll_entry_point () from /usr/bin/../lib32/wine/ntdll.dll.so
#11 0xf7559b6d in wine_call_on_stack () from /usr/bin/../lib32/libwine.so.1
#12 0xf7559c4e in wine_switch_to_stack () from /usr/bin/../lib32/libwine.so.1
Comment 1 Fanael 2014-04-29 14:33:07 UTC
Note: I was compiling with -O2, so the line number may not be very indicative. Should I post a backtrace of -O0?
Comment 2 Jakub Jelinek 2014-04-30 14:21:34 UTC
Isn't this a dup of PR60830 and thus a binutils bug?
Comment 3 Kai Tietz 2014-04-30 14:23:31 UTC
It is a duplicate of PR60830.
It is a pe-coff bug concerning weak-definitions.

*** This bug has been marked as a duplicate of bug 60830 ***