WineHQ
Bug Tracking Database – Bug 34813

 Bugzilla

 

Last modified: 2014-01-10 14:46:14 UTC  

winedbg crash reports are missing important information on Mac OS X 10.8+

Bug 34813 - winedbg crash reports are missing important information on Mac OS X 10.8+
winedbg crash reports are missing important information on Mac OS X 10.8+
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: dbghelp
unspecified
x86 MacOS
: P2 normal
: ---
Assigned To: Mr. Bugs
: patch
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-10-27 14:20 UTC by Ken Thomases
Modified: 2014-01-10 14:46 UTC (History)
1 user (show)

See Also:
Regression SHA1:
Fixed by SHA1: 1577fb6c3f5941a9b2ba1fec7e38e61cdfa2b757
Distribution: ---
Staged patchset:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Thomases 2013-10-27 14:20:19 UTC
For an example, see attachment 46421 [details] 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.
Comment 1 Ken Thomases 2013-10-28 20:48:54 UTC
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.)
Comment 2 Ken Thomases 2013-12-04 16:12:43 UTC
I have submitted patches to fix this:
http://source.winehq.org/patches/data/100877
http://source.winehq.org/patches/data/100878
Comment 4 Alexandre Julliard 2013-12-06 13:44:23 UTC
Closing bugs fixed in 1.7.8.
Comment 5 Alexandre Julliard 2014-01-10 14:46:14 UTC
Removing 1.6.x milestone from bugs included in 1.6.2.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers