https://bugs.winehq.org/show_bug.cgi?id=48183
Bug ID: 48183 Summary: Running most applications causes a crash in krnl386.exe DllMain() when the Windows version is set to non-NT Product: Wine Version: 4.16 Hardware: x86 OS: Linux Status: NEW Keywords: regression Severity: minor Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: z.figura12@gmail.com CC: julliard@winehq.org Regression SHA1: 911e50849a9bc05ab11d896a3b7f7a3b3462fabd Distribution: ---
The sequence of events goes as follows:
1. ntdll loads the main executable, 2. which loads e.g. advapi32, 3. which loads kernelbase, 4. which triggers attaching of kernel32, 5. which, if the Windows version is lower than NT, loads krnl386.exe, 6. which loads and attaches krnl386.exe, 7. which calls GetCommandLineA(), 8. which returns NULL, since kernelbase has not been attached yet, 9. which causes a crash when krnl386 tries to dereference it.
The crash is silently caught, but I'm not sure that any given 16-bit application still functions.
Most likely this will be fixed by moving more things to kernelbase; I'm filing this bug just in case it isn't.