mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
b5d3759fc5
MSVC's delayimp.lib does not actually free delayload dependencies. winecrt0's attempt to do so from ELF __attribute__((destructor)) is unnecessary and potentially harmful: - When triggered naturally via LdrUnloadDll, this leads to recursive calls to FreeLibrary, violating free_lib_count and missing DLL_PROCESS_DETACH - when triggered by glibc's _dl_fini (at process exit), it leads to use-after-free of the TEB (GetCurrentThreadID after the main thread is no longer Win32) via FreeLibrary -> LdrLdrUnloadDll -> RtlEnterCriticalSection( &loader_section ) - double-free of the library itself, since the DLL_PROCESS_DETACH has already been handled by LdrShutdownProcess - Race against wineserver sending a SIGKILL from process_killed, since all Win32 threads of the process have exited Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53032 |
||
---|---|---|
.. | ||
crt_dllmain.c | ||
crt_fltused.c | ||
debug.c | ||
delay_load.c | ||
dll_canunload.c | ||
dll_main.c | ||
dll_register.c | ||
exception.c | ||
exe16_entry.c | ||
exe_entry.c | ||
exe_main.c | ||
exe_wentry.c | ||
exe_wmain.c | ||
Makefile.in | ||
register.c | ||
setjmp.c | ||
stub.c | ||
unix_lib.c |