http://bugs.winehq.org/show_bug.cgi?id=25920
Summary: winedbg does not work under clang Product: Wine Version: 1.3.12 Platform: x86 URL: http://test.winehq.org/data/58786dc8ea237cf646e62edb86 5dc260684eb784/wine_ae-ub1004-clang/shdocvw:ie.html OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: dbghelp AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=33039) --> (http://bugs.winehq.org/attachment.cgi?id=33039) terminal output
When wine is compiled with clang, crashes do not get a good backtrace, instead, I get something like:
../../../tools/runtest -q -P wine -M shdocvw.dll -T ../../.. -p shdocvw_test.exe.so ie.c && touch ie.ok wine: Unhandled page fault on write access to 0x00000028 at address 0x68e94653 (thread 0039), starting debugger... Unhandled exception: page fault on write access to 0x00000028 in 32-bit code (0x68e94653). fixme:dbghelp:elf_new_wine_thunks Duplicate in L"oleaut32<elf>": OLEFontImpl_IPersistPropertyBag_Load.sAttrName<68f7b37c-0000000a> sAttrName<68f7b37c-0> fixme:dbghelp:elf_new_wine_thunks Duplicate in L"oleaut32<elf>": VarFormatPercent.szPercentBracket<68f853b6-00000006> szPercentBracket<68f853b6-0> ... fixme:dbghelp:elf_new_wine_thunks Duplicate in L"shdocvw_test<elf>": test_ConnectionPoint.dw<685dc820-00000004> dw<685dc820-0> fixme:dbghelp:elf_new_wine_thunks Duplicate in L"shdocvw_test<elf>": CLSID_FileProtocol<685d4260-00000010> IID_IInternetSession<685d4260-0> winedbg: Internal crash at 0x68641f3d
full output attached.
For building Wine with Clang, see http://wiki.winehq.org/Clang
http://bugs.winehq.org/show_bug.cgi?id=25920
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25825
http://bugs.winehq.org/show_bug.cgi?id=25920
--- Comment #1 from Austin English austinenglish@gmail.com 2011-02-13 04:32:57 CST --- Backtraces seem to work at -O0, see e.g., http://bugs2.winehq.org/attachment.cgi?id=33271 (bug 25808).
http://bugs.winehq.org/show_bug.cgi?id=25920
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@orange.fr
--- Comment #2 from Eric Pouech eric.pouech@orange.fr 2011-03-19 10:57:36 CDT --- 1/ confirming crash 2/ however, clang generates bogus dwarf information:
(compilation with -O2, clang version 2.8) ----8<--- [eric:~/work/output-wine/wine-clang]$ dwarfdump dlls/kernel32/kernel32.dll.so <<....>> .debug_line: line number info for a single cu dwarfdump ERROR: dwarf_srclines: DW_DLE_ATTR_FORM_BAD (114) <<....>> --------- 3/ seems confirmed by some web searches (on clang 2.8) see for example: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110221/117178....
4/ looking at the hexdump of the section show that the .debug_line section doesn't even contain its header
5/ I'll send a patch to protect dbghelp against bogus .debug_line sections in dwarf files. winedbg now generates the correct backtrace (even if they are a tons of duplicate symbols info. some of them are harmless, some others may require some more care. that would require another bug report.
6/ I didn't test for the yet to come 2.9 version (or its RC), but definitively a clang bug.
A+
http://bugs.winehq.org/show_bug.cgi?id=25920
--- Comment #3 from Austin English austinenglish@gmail.com 2011-03-21 15:18:19 CDT --- (In reply to comment #2)
1/ confirming crash 2/ however, clang generates bogus dwarf information:
(compilation with -O2, clang version 2.8) ----8<--- [eric:~/work/output-wine/wine-clang]$ dwarfdump dlls/kernel32/kernel32.dll.so <<....>> .debug_line: line number info for a single cu dwarfdump ERROR: dwarf_srclines: DW_DLE_ATTR_FORM_BAD (114)
<<....>>
3/ seems confirmed by some web searches (on clang 2.8) see for example: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110221/117178....
4/ looking at the hexdump of the section show that the .debug_line section doesn't even contain its header
5/ I'll send a patch to protect dbghelp against bogus .debug_line sections in dwarf files. winedbg now generates the correct backtrace (even if they are a tons of duplicate symbols info. some of them are harmless, some others may require some more care. that would require another bug report.
Thanks! I filed bug 26509 for that.
6/ I didn't test for the yet to come 2.9 version (or its RC), but definitively a clang bug.
That sounds a bit like http://llvm.org/bugs/show_bug.cgi?id=9268
http://bugs.winehq.org/show_bug.cgi?id=25920
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2011-04-02 18:36:45 CDT --- Fixed now, thanks Eric!
http://bugs.winehq.org/show_bug.cgi?id=25920
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2011-04-15 12:50:13 CDT --- Closing bugs fixed in 1.3.18.