Summary: | (meta) Valgrind 3.10 cannot load wine on OS X | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Mark Browning <mabrowningrr> |
Component: | general | Assignee: | Rhys Kidd <rhyskidd> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | austinenglish, philippe.waroquiers, rhyskidd, tom |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | macOS | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=262390 https://bugs.kde.org/show_bug.cgi?id=347988 |
||
Latest Commit: | Version Fixed In: | ||
Bug Depends on: | 349804, 345929, 347988 | ||
Bug Blocks: |
Description
Mark Browning
2014-09-11 18:12:13 UTC
Was any previous version of Valgrind able to load Wine on MacOS ? In other words, is this a regression, or is it something you have not tried before? I have not personally run wine under valgrind on OS X, but the documentation indicates that it was at one time supported: http://wiki.winehq.org/Wine_and_Valgrind#head-9c105724ce981944d64440f57caebd0c24d9f51b (In reply to Mark Browning from comment #0) > --72132:1:initimg Loading client > --72132:1:ume load_thin_file: begin: /opt/local/bin/wine > valgrind: mmap-FIXED(0x1000, 1073741824) failed in UME (load_segment2). The above looks to mmap 1Gb of memory starting at 0x1000. Seems somewhat strange. Maybe you could try by increasing the aspace mgr min addr using --aspace-minaddr ? (e.g. increase it to 100 MB and/or 500 Mb and/or ..;) and see if that helps ? Is the problem only happening with cachegrind ? (e.G. is --tool=none or --tool=memcheck giving the same) ? Is it working with the previous version of Valgrind ? (3.9 ?) And/or with another version of wine ? Yes, it happens independent of the tool. Still occurs with --aspace-minaddr=0x40000000. I've also tried running it with an x86 only build of valgrind 3.10, but the same error persists. Here is the memory mapping of wine without running it under valgrind: http://pastebin.com/bwKDJX5P Interestingly, the WINE_DOS allocation category starts at 0x1000 and is 0x40000000 in length. It looks subdivided, but I'm guessing it was all part of one original allocation. I changed wine/loader/main.c to only allocate 0x30000000 for this region. My application still works perfectly in wine, and valgrind manages to start up. Now I'm hitting a new error condition in valgrind. I still suspect this mmap-FIXED failure is a valgrind bug, though I don't know enough to say for sure. Thanks for pointing me in the suspicious direction. It's not so much a bug as a restriction - valgrind has to load itself somewhere and then can't allow a mapping which overlaps that. Normally that can be achieved by just choosing addresses that don't overlap but if a program tries to insist on a fixed address then valgrind may just have to refuse. Fortunately MAP_FIXED is not used very often, not least because it doesn't actually do what most people expect and is, in most cases, very dangerous. We have another user, Austin, who is testing some Wine-specific patches and will aim to run Wine's unit tests under Valgrind shortly. The result of that testing will be instructive for the status of our Wine support with Valgrind. Making this a meta bug for Wine issues with Valgrind on OS X. (In reply to Rhys Kidd from comment #8) > We have another user, Austin, who is testing some Wine-specific patches and > will aim to run Wine's unit tests under Valgrind shortly. > > The result of that testing will be instructive for the status of our Wine > support with Valgrind. With wine-2.1-153-g9c72376, and valgrind-3.13.0.SVN-16222-vex-3303, every Wine unit test fails due to bug 349804. This occurs with 32 and 64-bit Wine. |