| Summary: | vex amd64->IR: unhandled instruction bytes: 0x66 0x9D (popf) | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Tiago Martinho <tiagomartinho97> |
| Component: | memcheck | Assignee: | Julian Seward <jseward> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | mark, pjfloyd, tom |
| Priority: | NOR | ||
| Version First Reported In: | 3.21.0 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Tiago Martinho
2023-11-07 10:36:52 UTC
This looks like the size == 2 issue in VEX/priv/guest_amd64_toIR.c (dis_ESC_NONE):
case 0x9D: /* POPF */
/* Note. There is no encoding for a 32-bit popf in 64-bit mode.
So sz==4 actually means sz==8. */
if (haveF2orF3(pfx)) goto decode_failure;
vassert(sz == 2 || sz == 4 || sz == 8);
if (sz == 4) sz = 8;
if (sz != 8) goto decode_failure; // until we know a sz==2 test case exists
So here is an example where sz == 2. Question is if it is a valid example.
Is this only an issue with this hand assembly? It would be interesting to see real code that uses this. (In reply to Mark Wielaard from comment #2) > Is this only an issue with this hand assembly? > It would be interesting to see real code that uses this. Hi! I got this code from a library I depend on. Unfortunately I do not have access to the source code, but the disassembled code does have this instruction. I tried to give an example so that the issue could be reproduced. Thanks! What is the library? Is it public? (In reply to Paul Floyd from comment #4) > What is the library? Is it public? Unfortunately it's not a public library and I do not have access to the source code. |