[Bug 53032] winedevice.exe segfaults on exit when built by GCC >=12.0 and -march=pentium-m

WineHQ Bugzilla wine-bugs at winehq.org
Thu May 26 12:58:42 CDT 2022


https://bugs.winehq.org/show_bug.cgi?id=53032

--- Comment #21 from Bernhard Übelacker <bernhardu at mailbox.org> ---
This seems to be a more reliable callstack without the gdbinit.py magic,
but instead just loading the loader/wine executable.

I guess the important line is the free_delay_imports frame.
As this is a non-PE build, might this stack get damaged by the
stack unwinding - and therefore the wine call is no longer working?


Following is all from one thread, just before the segfault:

(rr) file /home/benutzer/wine-build/loader/wine
(rr) bt
#0  0xf7b7aaf2 in signal_exit_thread () from dlls/ntdll/ntdll.so
#1  0xf7b95fdf in abort_thread () at include/winnt.h:2165
#2  0xf7b777ce in wait_select_reply () at dlls/ntdll/unix/server.c:324
#3  0xf7b7a459 in server_select () at dlls/ntdll/unix/server.c:639
#4  0xf7b7a508 in server_wait () at dlls/ntdll/unix/server.c:666
#5  0xf7b8663c in NtWaitForMultipleObjects () at dlls/ntdll/unix/sync.c:1428
#6  0xf7b7ac09 in __wine_syscall_dispatcher () from dlls/ntdll/ntdll.so
#7  0x00000001 in ?? ()
#8  0x0155fd50 in ?? ()
#9  0xf7bc1340 in ?? () from dlls/ntdll/ntdll.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(rr) when
Current event: 366461
...
(rr) bt
#0  0xf7d1f610 in __longjmp_cancel () from /lib/libc.so.6
#1  0xf7d1f572 in __libc_longjmp () from /lib/libc.so.6
#2  0xf7d7b5a2 in unwind_stop () from /lib/libc.so.6
#3  0x7e1b439a in _Unwind_ForcedUnwind_Phase2 () at libgcc/unwind.inc:171
#4  0x7e1b46be in _Unwind_ForcedUnwind () at libgcc/unwind.inc:218
#5  0xf7d7b6fb in __pthread_unwind () from /lib/libc.so.6
#6  0xf7d738af in pthread_exit () from /lib/libc.so.6
#7  0xf7b929ed in pthread_exit_wrapper () at dlls/ntdll/unix/thread.c:1052
#8  0xf7b7aafa in signal_exit_thread () from dlls/ntdll/ntdll.so
#9  0x0165f338 in ?? ()
#10 0xf7d723bd in start_thread () from /lib/libc.so.6
#11 0xf7df953a in clone () from /lib/libc.so.6
(rr) when
Current event: 366462
...
(rr) bt
#0  0xf7b7ab09 in __wine_syscall_dispatcher () from dlls/ntdll/ntdll.so
#1  0x7bc3544c in NtClose () from dlls/ntdll/ntdll.dll.so
#2  0x7b08a1a1 in CloseHandle () at dlls/kernelbase/process.c:421
#3  0x7e154ddf in SetupCloseLog () at dlls/setupapi/misc.c:1661
#4  0x7e164949 in DllMain () at dlls/setupapi/setupcab.c:453
#5  0x7bc54b16 in call_dll_entry_point () from dlls/ntdll/ntdll.dll.so
#6  0x7bc59381 in MODULE_InitDLL () at dlls/ntdll/loader.c:1568
#7  0x7bc5992f in process_detach () at dlls/ntdll/loader.c:1714
#8  0x7bc59be5 in LdrUnloadDll () at dlls/ntdll/loader.c:3850
#9  0x7bc59c87 in LdrUnloadDll () at dlls/ntdll/loader.c:3833
#10 0x7b056009 in FreeLibrary () at dlls/kernelbase/loader.c:265
#11 0x7e5d8091 in free_delay_imports () at dlls/winecrt0/delay_load.c:78
#12 0xf7f04df2 in _dl_fini () at dl-fini.c:142
#13 0xf7d223a3 in __run_exit_handlers () from /lib/libc.so.6
#14 0xf7d224f7 in exit () from /lib/libc.so.6
#15 0xf7d7242e in start_thread () from /lib/libc.so.6
#16 0xf7df953a in clone () from /lib/libc.so.6
(rr) when
Current event: 366462


What I do not yet understand why the free_delay_imports
seems not to get called at all at my usual Debian system.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list