| Summary: | vex x86->IR: unhandled instruction bytes: 0x66 0xF 0xCE 0x4F | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Alex Henrie <alexhenrie24> |
| Component: | vex | Assignee: | Julian Seward <jseward> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | dougvj |
| Priority: | NOR | ||
| Version First Reported In: | 3.15 SVN | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
16-bit bswap test case
Proposed patch 16-bit bswap test case Leawo output with patched Valgrind |
||
|
Description
Alex Henrie
2020-01-01 03:50:43 UTC
Created attachment 124818 [details]
Proposed patch
The attached patch fixes the unhandled instruction problem. Unfortunately, Leawo then pops up the following error dialog:
A debugger has been found running in your system.
Please, unload it from memory and restart your program.
There's probably a way past this, but even if there isn't, Valgrind produced several warnings about the Wine code that is executed up to that point. So if this patch is accepted, even though it doesn't get Leawo working all the way on Valgrind, it still would help me and other Wine developers to start to debug it.
(In reply to Alex Henrie from comment #1) > There's probably a way past this, but even if there isn't, Valgrind produced > several warnings about the Wine code that is executed up to that point. Make sure you're working with the trunk code, so you have the latest false-positive-avoidance stuff in place. As a side comment: I'm not sure if the Wine developers are aware of this, but some years back I added to Valgrind, a transformation aimed at reducing the false positive level from code compiled by MSVC. It's not enabled by default but you could easily do so. In VEX/priv/ir_opt.c, find this if (0) bb = do_MSVC_HACKS(bb); and change it to "if (1)". The transformation that it does is described in a big comment beginning "MSVC specific transformation hacks" in that same source file. Created attachment 124859 [details]
16-bit bswap test case
I had added a check to Doug's test program to make sure that it was running in 32-bit mode, but it actually works in 64-bit mode too. Here's the same program without the check I hacked in.
Created attachment 124860 [details] Leawo output with patched Valgrind (In reply to Julian Seward from comment #2) > Make sure you're working with the trunk code, so you have the latest > false-positive-avoidance stuff in place. > > As a side comment: I'm not sure if the Wine developers are aware of this, > but some years back I added to Valgrind, a transformation aimed at reducing > the false positive level from code compiled by MSVC. It's not enabled by > default but you could easily do so. In VEX/priv/ir_opt.c, find this > > if (0) > bb = do_MSVC_HACKS(bb); > > and change it to "if (1)". The transformation that it does is described in > a big comment beginning "MSVC specific transformation hacks" in that same > source file. Thanks for the tips! I'm attaching the warnings I'm seeing from Leawo running on trunk Valgrind with the 16-bit BSWAP patch. I don't think the MSVC hacks would help here. And you're aware of the as-yet unmerged PDB reading fixes at [1], yes? https://bugs.kde.org/show_bug.cgi?id=253657 (In reply to Julian Seward from comment #5) > And you're aware of the as-yet unmerged PDB reading fixes at [1], yes? > https://bugs.kde.org/show_bug.cgi?id=253657 Yes, I know about those patches. There are also patches somewhere to make Wine produce PDB files for its own DLLs, but they have not been accepted into Wine yet. Fixed, 6e0573777c487e83d5fbd2fd764b041e59784766. Thanks for the patch and analysis. Thank you! |