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
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/750
- kernelbase: Fix error value for PE files without resource.
- include: Simplify handling of va_list in debug printf functions.
- include: Add va_list version of the debug printf functions.
- include: Avoid _t-suffixes.
- include: Add list_move_after() and list_move_before().
- user32: Call winproc_init before dpiaware_init.
- combase: Omit thread ID from the stub manager ipid for MTA objects.
- d3dx10: Factor out image format conversion function.
- d3dx10: Use WIC functions to obtain info about DDS image.
- d3dx10: Add support for texture cubes in D3DX10CreateTexture functions.
- d3dx10: Don't check frame count in load_texture_data.
- d3dx10: Add support for loading MipLevels data in load_texture_data.
- d3dx10/tests: Improve cube textures data testing.
- winemac.drv: Rename display modes cache variables.
- winemac.drv: Invalidate mode cache when enum flags changes.
- winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
- winemac.drv: Check for non-primary adapter earlier in macdrv_ChangeDisplaySettingsEx.
- winemac.drv: Support getting non-primary adapter current display mode.
- winemac.drv: Support enumerating non-primary adapters display modes.
- evr/filter: Implement pin's connect/disconnect.
- d3dx10: Implement D3DX10PreprocessShaderFromMemory().
- d3dx10/tests: Add a test for D3DX10PreprocessShaderFromMemory().
- wmvcore/tests: Use a constant for test.wmv duration.
- wmvcore/tests: Test sync reader output settings read / write.
- wmvcore/tests: Test async reader output settings read / write.
- wmvcore/tests: Test that the callback thread is always the same.
- wmvcore/tests: Test async reader compressed sample monotonic pts.
- wmvcore/tests: Test async reader DedicatedDeliveryThread setting.
- mshtml/tests: Fix a spelling error in an ok() message.
- dbghelp: Fix a couple of spelling errors in a comment.
- mscvpdb: Fix a spelling error in a comment.
- winspool.drv/tests: Fix the spelling of a variable name.
- winex11.drv: Make get_unix_file_name() static.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/746
- kernelbase: Fix error value for PE files without resource.
- include: Simplify handling of va_list in debug printf functions.
- include: Add va_list version of the debug printf functions.
- include: Avoid _t-suffixes.
- include: Add list_move_after() and list_move_before().
- user32: Call winproc_init before dpiaware_init.
- combase: Omit thread ID from the stub manager ipid for MTA objects.
- d3dx10: Factor out image format conversion function.
- d3dx10: Use WIC functions to obtain info about DDS image.
- d3dx10: Add support for texture cubes in D3DX10CreateTexture functions.
- d3dx10: Don't check frame count in load_texture_data.
- d3dx10: Add support for loading MipLevels data in load_texture_data.
- d3dx10/tests: Improve cube textures data testing.
- winemac.drv: Rename display modes cache variables.
- winemac.drv: Invalidate mode cache when enum flags changes.
- winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
- winemac.drv: Check for non-primary adapter earlier in macdrv_ChangeDisplaySettingsEx.
- winemac.drv: Support getting non-primary adapter current display mode.
- winemac.drv: Support enumerating non-primary adapters display modes.
- evr/filter: Implement pin's connect/disconnect.
- d3dx10: Implement D3DX10PreprocessShaderFromMemory().
- d3dx10/tests: Add a test for D3DX10PreprocessShaderFromMemory().
- wmvcore/tests: Use a constant for test.wmv duration.
- wmvcore/tests: Test sync reader output settings read / write.
- wmvcore/tests: Test async reader output settings read / write.
- wmvcore/tests: Test that the callback thread is always the same.
- wmvcore/tests: Test async reader compressed sample monotonic pts.
- wmvcore/tests: Test async reader DedicatedDeliveryThread setting.
- mshtml/tests: Fix a spelling error in an ok() message.
- dbghelp: Fix a couple of spelling errors in a comment.
- mscvpdb: Fix a spelling error in a comment.
- winspool.drv/tests: Fix the spelling of a variable name.
- winealsa.drv: Make functions static where possible.
- winex11.drv: Make get_unix_file_name() static.
- dinput: Remove WINAPI on static functions where not needed.
- dinput/tests: Remove WINAPI on static functions where not needed.
- crypt32: Remove WINAPI on static functions where not needed.
- windows.media.speech: Remove WINAPI on static functions where not needed.
- winexinput.sys: Remove WINAPI on static functions where not needed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/743