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.