http://bugs.winehq.org/show_bug.cgi?id=34813
Bug #: 34813 Summary: winedbg crash reports are missing important information on Mac OS X 10.8+ Product: Wine Version: unspecified Platform: x86 OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: dbghelp AssignedTo: wine-bugs@winehq.org ReportedBy: ken@codeweavers.com Classification: Unclassified
For an example, see attachment 46421 from bug 34811.
Built-in DLLs are shown as PE modules instead of ELF wrappers around PE modules.
The address ranges for the modules are likely incorrect. Many of them are shown as taking 4 pages (16KB) when I'm sure they're much larger. For example, gdi32.
As a consequence, none of the stack frames resolve to symbols/functions. Few of them even resolve to modules other than "<wine-loader>".
I believe this only affects OS X 10.8 and later. It doesn't affect 10.6.8. I suspect it has to do with image sliding.
http://bugs.winehq.org/show_bug.cgi?id=34813
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=34813
--- Comment #1 from Ken Thomases ken@codeweavers.com 2013-10-28 20:48:54 CDT --- The problem is Address Space Layout Randomization (ASLR). Dyld is being loaded into a random address in the process, which invalidates an assumption made in dlls/dbghelp/macho_module.c:macho_load_file(). That assumes that the address of the symbol "_dyld_all_image_infos" in /usr/lib/dyld is where the dynamic loader image info will be found in all processes.
In the presence of ASLR, it's difficult to find where that dyld info really is.
The only viable approach I've found is to use Mach's task_info() function with the TASK_DYLD_INFO flavor. This requires that the caller have the debuggee's Mach task port name. A task can obtain its own task port name, but to obtain the task port name of another task requires privileges. Wine processes do send their task port to the wineserver at startup, though. So, it would be possible for the debugger to request that the wineserver obtain the debuggee's dyld info and return it.
(The TASK_DYLD_INFO flavor isn't declared in the 10.5 SDK, so we may need to keep the existing approach as a fallback until we abandon support for 10.5.)
http://bugs.winehq.org/show_bug.cgi?id=34813
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #2 from Ken Thomases ken@codeweavers.com 2013-12-04 16:12:43 CST --- I have submitted patches to fix this: http://source.winehq.org/patches/data/100877 http://source.winehq.org/patches/data/100878
http://bugs.winehq.org/show_bug.cgi?id=34813
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1577fb6c3f5941a9b2ba1fec7e3 | |8e61cdfa2b757 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #3 from Ken Thomases ken@codeweavers.com 2013-12-05 13:25:32 CST --- Fixed by http://source.winehq.org/git/wine.git/?a=commit;h=1577fb6c3f5941a9b2ba1fec7e...
http://bugs.winehq.org/show_bug.cgi?id=34813
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2013-12-06 13:44:23 CST --- Closing bugs fixed in 1.7.8.
https://bugs.winehq.org/show_bug.cgi?id=34813
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
https://bugs.winehq.org/show_bug.cgi?id=34813
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- Removing 1.6.x milestone from bugs included in 1.6.2.