https://bugs.winehq.org/show_bug.cgi?id=50061
Bug ID: 50061 Summary: winetricks -q quicktime76 hangs Product: Wine Version: 5.20 Hardware: x86-64 OS: Linux Status: NEW Keywords: download, Installer, regression Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com CC: pgofman@codeweavers.com Regression SHA1: ec1ea1ea1b2469a526f4bbc38aab404b7a2b062c Distribution: Gentoo
Regression, introduced by:
ec1ea1ea1b2469a526f4bbc38aab404b7a2b062c is the first bad commit commit ec1ea1ea1b2469a526f4bbc38aab404b7a2b062c Author: Paul Gofman pgofman@codeweavers.com Date: Fri Oct 9 05:51:27 2020 +0300
ntdll: Call FLS callbacks.
Signed-off-by: Paul Gofman pgofman@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
dlls/kernel32/tests/fiber.c | 24 +++++++++++--- dlls/kernel32/tests/loader.c | 79 ++++++++++++++++++++++++++++++++------------ dlls/ntdll/loader.c | 8 ++++- dlls/ntdll/thread.c | 40 +++++++++++++++++++--- 4 files changed, 119 insertions(+), 32 deletions(-)
winedbg starts, but never prints a backtrace and hangs. Disabling the crashdialog first has no effect, still hangs and don't get a backtrace.
https://bugs.winehq.org/show_bug.cgi?id=50061
--- Comment #1 from Paul Gofman pgofman@codeweavers.com --- Created attachment 68520 --> https://bugs.winehq.org/attachment.cgi?id=68520 Test program
I've tested the installer. It looks like /qn mode is just broken on Windows as well, I tried it on both latest Win10 and Win7 and it terminates early.
The installation in interactive mode succeeds for me with the current Wine.
What happens here is that in non-interactive mode the installer executes the following sequence of relevant calls in DllMain of QuickTime.qts for DLL_PROCESS_ATTACH: 1. index = FlsAlloc(callback); 2. FlsSetValue(index, <non-zero-value>); 3. handle = GetModuleHandle("CoreFoundation.dll"); (this fails and returns NULL when run in quiet mode, CoreFoundation.dll load is not ever attempted; this returns a valid handle in interactive mode, CoreFoundation.dll is successfully loaded before); 4. proc = GetProcAddress(handle, "__CFStringMakeConstantString"); 5. call proc - this expectedly faults in quiet mode; 6. For the failing quiet mode scenario, the fault is caught in ntdll/loader.c:MODULE_InitDLL(), init dll gets failure status and the process goes shutting down. Before the blame commit the process was shutting down quiet and this failure somehow did not affect the returned install result. With the blame commit, the process is faulting during calling FLS callback on thread detach as the FLS callback points into the QuickTime.qts segment which is already unloaded. I've made a simple test program (attached) demonstrating the similar failure under Windows (attached: compile as i686-w64-mingw32-gcc -shared ./dll_fls_fault.c -o a.dll; test as 'regsvr32 a.dll'). The test does not involve any faults in library initialization, but shows that if there are any outstanding FLS callback left after DLL unload, that is going to crash on thread or process termination. The application bug in dll here, besides crashing on process attach in Dll main, is not calling FlsFree for process detach for the index it allocated in process attach.
So I don't see any actual regression here so far. The quiet mode installation looks broken on Windows as well and worked by chance previously when we were not calling FLS callbacks at all.
https://bugs.winehq.org/show_bug.cgi?id=50061
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Keywords|regression | Regression SHA1|ec1ea1ea1b2469a526f4bbc38aa | |b404b7a2b062c | Status|NEW |RESOLVED
--- Comment #2 from Austin English austinenglish@gmail.com --- Okay, thanks for looking!
Marking invalid since we're matching (current) windows.
https://bugs.winehq.org/show_bug.cgi?id=50061
--- Comment #3 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=50061
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Austin English austinenglish@gmail.com --- Closing.