lb90

Results 122 comments of lb90

That's what I could get: ``` Thread 1 hit Breakpoint 1, 0x00007fff79682230 in ntdll!ZwTerminateProcess () from C:\WINDOWS\SYSTEM32\ntdll.dll #0 0x00007fff79682230 in ntdll!ZwTerminateProcess () from C:\WINDOWS\SYSTEM32\ntdll.dll #1 0x00007fff7952b01b in ntdll!RtlRaiseException () from...

Ok, here's a detailed stacktrace obtained with VS: ``` > ntdll.dll!NtTerminateProcess() Unknown ntdll.dll!RtlpWaitOnCriticalSection() Unknown ntdll.dll!RtlpEnterCriticalSectionContended() Unknown ntdll.dll!RtlEnterCriticalSection() Unknown ntdll.dll!LdrpAddUnicodeStringToSnapsBuffer() Unknown ntdll.dll!LdrpLogInternal() Unknown ntdll.dll!LdrGetDllHandle() Unknown KERNELBASE.dll!00007fff76ddfc86() Unknown SHCore.dll!wil_details_GetNtDllModuleHandle(void) Unknown SHCore.dll!wil::details::RtlDllShutdownInProgress(void) Unknown...

So it's actualy point 1 from https://github.com/msys2/MINGW-packages/issues/26646#issuecomment-3597423787. That said, I'd avoid depending on the late flush implemented by the CRT. A solution is to add an early flush from the...

> Actually removing librsvg fixes it in all cases. Ah, this is interesting :) ``` $ gdb --args ffmpeg -version GNU gdb (GDB) 16.3 Copyright (C) 2024 Free Software Foundation,...

librsvg depends on GIO which spawns a worker thread to do some initialization, including loading some libraries. SHCore, on DllMain, calls GetModuleHandle. This tries to acquire the loader lock which...

Mmh wait, actually ExitProcess acquires the loader lock before terminating all other threads. So it seems that GetModuleHandle can acquire another lock? Will keep investigating...

Ah ok, it's `LdrpSnapsLock`: ``` ntdll.dll!RtlEnterCriticalSection() ntdll.dll!LdrpAddUnicodeStringToSnapsBuffer() ntdll.dll!LdrpLogInternal() ntdll.dll!LdrGetDllHandle() KERNELBASE.dll!00007fff76ddfc86() ``` It's acquired regardless if loader snaps is enabled or not. Of course that lock can be acquired when the...

> I don't see SHCore.dll being loaded Can you check the strace file after test.sh fails? Here's what I get locally: ``` $ ./test.sh ok: 0 (repeat many times) empty:...

I can reproduce with this sample: ```c #ifndef UNICODE #define UNICODE #define _UNICODE #endif #include #include #include static unsigned int __stdcall thread_main(void* user_data) { for (;;) { GetModuleHandle(L"ntdll.dll"); } return...

I have now opened: * https://github.com/microsoft/wil/issues/567 * https://github.com/mingw-w64/mingw-w64/pull/141