[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #30 from Daniel Lehman --- Created attachment 125416 --> https://bugs.kde.org/attachment.cgi?id=125416=edit bool to skip msvc x64 code path in non-wine case > The obvious fix is to keep a boolean indicating whether any Windows unwind > info has been loaded, and if false, just skip this call. That would remove > the > perf hit for non-Wine use. something like the attached? i based it on FPO_info_present. the patch is rebased against the rollup. it still works with the above test case on 64-bit wine but i verified it is not called with non-wine (using python -c "import numpy") -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Julian Seward changed: What|Removed |Added Attachment #59716|0 |1 is obsolete|| Attachment #122256|0 |1 is obsolete|| --- Comment #29 from Julian Seward --- Created attachment 125367 --> https://bugs.kde.org/attachment.cgi?id=125367=edit Rollup patch, which is simply the 15 patches merged Here's a rollup patch, which is just the previous 15 patches merged and with a bit of reformatting. It applies to the trunk as at 24 Jan 2020. I haven't landed it because the change in coregrind/m_stacktrace.c potentially gives a large performance problem. If the call to VG_(use_CFI_info) fails, then we now try with VG_(use_MSVC_x64_info). That is guaranteed to fail in "normal" (non-Wine) use. But before it fails it could potentially visit the entire debugInfo list, which can contains hundreds of DebugInfos for large complex applications. The obvious fix is to keep a boolean indicating whether any Windows unwind info has been loaded, and if false, just skip this call. That would remove the perf hit for non-Wine use. -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #28 from Daniel Lehman --- nothing new to add for now -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #27 from Julian Seward --- (In reply to Daniel Lehman from comment #25) > Created attachment 122256 [details] > patches for wine64 and pdbs I will try and look at these patches in the next couple of weeks, to see if they can be integrated. If you have any more recent version of them, can you please attach them instead? -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Tom Hughes changed: What|Removed |Added CC||eekn...@gmail.com --- Comment #26 from Tom Hughes --- *** Bug 414659 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Daniel Lehman changed: What|Removed |Added Attachment #114890|0 |1 is obsolete|| --- Comment #25 from Daniel Lehman --- Created attachment 122256 --> https://bugs.kde.org/attachment.cgi?id=122256=edit patches for wine64 and pdbs rebased to latest master with fix from: https://bugs.kde.org/show_bug.cgi?id=400538 and retested with: - wine 4.13 - vs2017 15.9.15 -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Alex Henrie changed: What|Removed |Added CC||alexhenri...@gmail.com -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Alex Henrie changed: What|Removed |Added See Also||https://bugs.kde.org/show_b ||ug.cgi?id=400538 -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #24 from Austin English --- (In reply to Daniel Lehman from comment #23) > > 0030:err:seh:NtRaiseException Unhandled exception code c01d flags 0 > > addr 0x7bc95b63 > > that's probably the iretq instruction from set_cpu_context > > > What VALGRIND_OPTS are you using? > > -v --trace-children=yes --error-limit=no --log-file=output.txt > --leak-check=full --leak-resolution=high --show-leak-kinds=all > > > did I miss a step? > > no, sorry, i forgot that i had to create a symlink to find the pdb: > ln -s $HOME $WINEPREFIX/drive_Y > because the baked-in path is Y:/stuff/leakage That's weird..when first trying this, I missed your 'drive_Y' bit and was symlinking to dosdevices/y:, which failed. With drive_Y, it works (not valgrind's problem, of course). I can verify that works for me: + /home/austin/src/valgrind/vg-in-place wine64 leakage.exe preloader: Warning: failed to reserve range 0011-6800 ==32694== Conditional jump or move depends on uninitialised value(s) ==32694==at 0x14005F7DE: __strncnt (strncnt.cpp:21) ==32694==by 0x7B9D4E0A8F2C: ??? ==32694== Uninitialised value was created by a stack allocation ==32694==at 0x14004BB17: setSBUpLow (in /tmp/tmp.sYSJGwj3qz/stuff/leakage/leakage.exe) ==32694== 7E018520 setframe: 7E20FCD0 7E01C6D0 006e:fixme:kernelbase:AppPolicyGetProcessTerminationMethod 0xfffa, 0x7e20fd10 ==32694== 12,345 bytes in 1 blocks are definitely lost in loss record 92 of 93 ==32694==at 0x7BC5BB35: initialize_block (heap.c:238) ==32694==by 0x7BC5BB35: RtlAllocateHeap (???:0) ==32694==by 0x140006BDA: a (leakage.c:9) ==32694==by 0x140006BF8: b (leakage.c:14) ==32694==by 0x140006C18: c (leakage.c:19) ==32694==by 0x140006CF8: main (leakage.c:43) ==32694== ==32694== 23,456 bytes in 1 blocks are definitely lost in loss record 93 of 93 ==32694==at 0x7BC5BB35: initialize_block (heap.c:238) ==32694==by 0x7BC5BB35: RtlAllocateHeap (???:0) ==32694==by 0x140006C8C: setframe (leakage.c:28) ==32694==by 0x140006CB8: d (leakage.c:33) ==32694==by 0x140006CD8: e (leakage.c:38) ==32694==by 0x140006D0C: main (leakage.c:44) ==32694== == For our valgrind friends, if you'd like to test Daniel's patch, here's a short script to do so. Get wine64 from your package manager (4.0 stable should work, or probably any version), then run the script, no special wine knowledge needed :) #!/bin/bash # Requires wine64 (nothing special needed, get it from your package manager) # and valgrind, of course export VALGRIND="${VALGRIND:-valgrind}" export VALGRIND_OPTS="-q --trace-children=yes --track-origins=yes --leak-check=full --num-callers=20 --vex-iropt-register-updates=allregs-at-mem-access" export WINEPREFIX="${WINEPREFIX:-$HOME/.wine}" tmpdir="$(mktemp -d)" cd "$tmpdir" mkdir -p stuff/leakage cd stuff/leakage wget -O stuff.tar.bz2 "https://bugs.kde.org/attachment.cgi?id=118764; tar xjf stuff.tar.bz2 ln -sf "$tmpdir" "$WINEPREFIX/drive_Y" # Here we go: "$VALGRIND" wine64 leakage.exe cd rm -rf "$tmpdir" -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #23 from Daniel Lehman --- > 0030:err:seh:NtRaiseException Unhandled exception code c01d flags 0 addr > 0x7bc95b63 that's probably the iretq instruction from set_cpu_context > What VALGRIND_OPTS are you using? -v --trace-children=yes --error-limit=no --log-file=output.txt --leak-check=full --leak-resolution=high --show-leak-kinds=all > did I miss a step? no, sorry, i forgot that i had to create a symlink to find the pdb: ln -s $HOME $WINEPREFIX/drive_Y because the baked-in path is Y:/stuff/leakage -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #22 from Austin English --- That said, it's still an improvement. Without the patchset, I get: austin@laptop:~$ /opt/valgrind/bin/valgrind /opt/oldwow64/wine-4.0-rc1/bin/wine leakage.exe ; echo $? preloader: Warning: failed to reserve range 0011-6800 preloader: Warning: failed to reserve range 7f00-8200 preloader: Warning: failed to reserve range 0011-6800 0030:err:seh:segv_handler Got unexpected trap 0 ==6737== Invalid write of size 8 ==6737==at 0x7BC95B68: ??? (in /opt/oldwow64/wine-4.0-rc1/lib64/wine/ntdll.dll.so) ==6737==by 0x7BC95B62: ??? (in /opt/oldwow64/wine-4.0-rc1/lib64/wine/ntdll.dll.so) ==6737==by 0x7BC95C3A: ??? (in /opt/oldwow64/wine-4.0-rc1/lib64/wine/ntdll.dll.so) ==6737== Address 0x7e20f4b8 is in a rw- anonymous segment ==6737== 0030:err:seh:NtRaiseException Unhandled exception code c01d flags 0 addr 0x7bc95b63 29 -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #21 from Austin English --- (In reply to Daniel Lehman from comment #20) > Created attachment 118764 [details] > leakage.exe and pdb > > attached tested with: > - Visual Studio 2017 (15.9.8) > - wine 4.3 > - valgrind-3.15.0.GIT (4816357b5c7ee5284cdf72800a81d2dd1845388f) Thanks. I wasn't able to reproduce, with same valgrind git commit (+ your patches) and wine-4.0-rc1 (last wow64 build I have handy, but given that you used 3.15 before I don't think it matters). What VALGRIND_OPTS are you using? I tried with: austin@laptop:~$ export VALGRIND_OPTS="-q --trace-children=yes --track-origins=yes --leak-check=full --num-callers=20 --vex-iropt-register-updates=allregs-at-mem-access" and got: austin@laptop:~$ ~/src/valgrind/vg-in-place /opt/oldwow64/wine-4.0-rc1/bin/wine leakage.exe ; echo $? preloader: Warning: failed to reserve range 0011-6800 preloader: Warning: failed to reserve range 7f00-8200 preloader: Warning: failed to reserve range 0011-6800 ==6365== Conditional jump or move depends on uninitialised value(s) ==6365==at 0x14005F7DE: ??? ==6365==by 0x51B686B7C272: ??? ==6365== Uninitialised value was created by a stack allocation ==6365==at 0x14004BB17: ??? ==6365== 7E01B5F0 setframe: 7E20FCD0 7E01F7A0 ==6365== 12,345 bytes in 1 blocks are definitely lost in loss record 86 of 88 ==6365==at 0x7BC5B385: initialize_block (heap.c:238) ==6365==by 0x7BC5B385: RtlAllocateHeap (???:0) ==6365==by 0x140006BDA: ??? ==6365== ==6365== 23,456 bytes in 1 blocks are definitely lost in loss record 88 of 88 ==6365==at 0x7BC5B385: initialize_block (heap.c:238) ==6365==by 0x7BC5B385: RtlAllocateHeap (???:0) ==6365==by 0x140006C8C: ??? ==6365==by 0x51B686B7CD62: ??? ==6365== 0 did I miss a step? -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #20 from Daniel Lehman --- Created attachment 118764 --> https://bugs.kde.org/attachment.cgi?id=118764=edit leakage.exe and pdb attached tested with: - Visual Studio 2017 (15.9.8) - wine 4.3 - valgrind-3.15.0.GIT (4816357b5c7ee5284cdf72800a81d2dd1845388f) -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #19 from Austin English --- (In reply to Daniel Lehman from comment #18) > Created attachment 114891 [details] > simple test case for wine64 pdb Hi Daniel, Would you mind attaching a pre-built binary? I'd like to test this, but I don't currently have Visual Studio set up (and won't be able to for a week or so at the earliest). Thanks! -Austin -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Daniel Lehman changed: What|Removed |Added CC||dlehma...@gmail.com --- Comment #18 from Daniel Lehman --- Created attachment 114891 --> https://bugs.kde.org/attachment.cgi?id=114891=edit simple test case for wine64 pdb -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #17 from Daniel Lehman --- Created attachment 114890 --> https://bugs.kde.org/attachment.cgi?id=114890=edit patches for wine64 and pdbs The attached patches get wine64 with pdbs working. I'm sure additional patches will be needed, but it's a start. The attached leakage.c produces the following output on 64-bit Wine with these changes: ==689== 12,345 bytes in 1 blocks are definitely lost in loss record 70 of 71 ==689==at 0x7BC5ACCD: initialize_block (heap.c:238) ==689==by 0x7BC5ACCD: RtlAllocateHeap (???:0) ==689==by 0x140006C0A: a (leakage.c:9) ==689==by 0x140006C28: b (leakage.c:14) ==689==by 0x140006C48: c (leakage.c:19) ==689==by 0x140006D28: main (leakage.c:43) ==689== ==689== 23,456 bytes in 1 blocks are possibly lost in loss record 71 of 71 ==689==at 0x7BC5ACCD: initialize_block (heap.c:238) ==689==by 0x7BC5ACCD: RtlAllocateHeap (???:0) ==689==by 0x140006CBC: setframe (leakage.c:28) ==689==by 0x140006CE8: d (leakage.c:33) ==689==by 0x140006D08: e (leakage.c:38) ==689==by 0x140006D3C: main (leakage.c:44) leakage.c built 32-bit with pdb fails with and without my changes. But with the attached, both 32-bit and 64-bit Wine tests still run under valgrind. Tested with the following: - Visual Studio 2017 (15.8.3) (Optimizing Compiler Version 19.15.26726 for x64) - Wine 3.15 - valgrind-3.14.0.GIT (097b2076013bd6082be189ab55dbdb2eb1e572b7) -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 Austin English changed: What|Removed |Added CC||austinengl...@gmail.com -- You are receiving this mail because: You are watching all bug changes.
[valgrind] [Bug 253657] missing some amd64 to let wine/amd64 run on valgrind/amd64
https://bugs.kde.org/show_bug.cgi?id=253657 --- Comment #16 from Stas Sergeev--- Created attachment 97737 --> https://bugs.kde.org/attachment.cgi?id=97737=edit a test case Sorry for delay. Here's the segregs test case. -- You are receiving this mail because: You are watching all bug changes.