http://bugs.winehq.org/show_bug.cgi?id=58742
Bug ID: 58742 Summary: winedbg: Internal crash at 00006FFFFF8CB5E5 (pe_load_msc_debug_info) Product: Wine Version: 10.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: winedbg Assignee: wine-bugs@winehq.org Reporter: zowie+wine@vandillen.io Distribution: ---
Platform: Linux Mint 21.3 Cinnamon Linux Kernel: 5.15.0-156-generic Platform 2: Linux Mint 22.2 Cinnamon Linux Kernel 2: 6.8.0-83-generic
When I build Wine myself and run the command `$WINE winedbg explorer` with it, it leads to a crash. This does not happen with the official builds of Wine, so I'm guessing there's some package version difference or something along those lines that makes this occur.
Log from a custom build of 10.15: ``` user@pc:~/wine/test$ $WINE winedbg explorer WineDbg starting on pid 0184 0180:fixme:dbghelp:elf_search_auxv can't find symbol in module 0180:fixme:dbghelp:elf_search_auxv can't find symbol in module winedbg: Internal crash at 00006FFFFF8CB5E5 user@pc:~/wine/test$ ```
Log from the official build of 10.15: ``` user@pc:~/wine/test$ wine winedbg explorer WineDbg starting on pid 01b4 01b0:fixme:dbghelp:elf_search_auxv can't find symbol in module 01b0:fixme:dbghelp:elf_search_auxv can't find symbol in module 0x006fffffc00c3d ntdll+0x10c3d: retq Wine-dbg> ```
The crash occurs in pe_load_msc_debug_info from pe_module.c, in the branch with `/* Debug info is stripped to .DBG file */`. The variable `dbg` is null, so it crashes when trying to dereference it.
Here's a quick fix I made for it. It fixes the crash but it doesn't really solve the underlying issue. As a result the debugger is missing so much debug information that it's not actually that helpful. ``` /* Read in debug directory */ dbg = RtlImageDirectoryEntryToData( mapping, FALSE, IMAGE_DIRECTORY_ENTRY_DEBUG, &nDbg ); nDbg = dbg ? nDbg / sizeof(IMAGE_DEBUG_DIRECTORY) : 0;
/* NEW */ if (!dbg) { pe_unmap_full(fmap); return ret; } /* END */
/* Parse debug directory */ ```
It's a bit annoying but for the time being I'll probably use the official build for debugging, or maybe I'll try to build Wine using the Docker set-up from the Gitlab CI.