You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that DEBUG_ASSERT(*pc - desc->pc_ == instr_length(dcontext, instr)) incorrectly assumes that the instruction will be encoded in a particular way. Some Thumb instructions have both a 2-byte and a 4-byte encoding, and the 4-byte encoding seems to be used instead of an alternative 2-byte encoding in the C library code that comes with Debian 10 so you might be able to reproduce this with an a.out built from int main() { return 0; }; I could.
The fix is to delete that line with that DEBUG_ASSERT?
The text was updated successfully, but these errors were encountered:
If it has the wrong ISA mode then it's going to get everything else wrong. No, please do not remove the assert. Sounds like there's a bug in setting the mode somewhere.
Oh you mean encoding fidelity is lost: that's because #4016 is missing for AArchXX and so the raw bits are lost; also xref #3271 and #3339. #4016 is what we want to solve this.
Just to get tests passing, do you think we could do something like the following?
#ifndef ARM /* FIXME i#4016: Reencoding a T32 instruction can change its length from 4 to 2. */
DEBUG_ASSERT(*pc - desc->pc_ == instr_length(dcontext, instr));
#endif
Reproduce like this on a 32-bit Arm system:
Get:
It appears that
DEBUG_ASSERT(*pc - desc->pc_ == instr_length(dcontext, instr))
incorrectly assumes that the instruction will be encoded in a particular way. Some Thumb instructions have both a 2-byte and a 4-byte encoding, and the 4-byte encoding seems to be used instead of an alternative 2-byte encoding in the C library code that comes with Debian 10 so you might be able to reproduce this with ana.out
built fromint main() { return 0; }
; I could.The fix is to delete that line with that
DEBUG_ASSERT
?The text was updated successfully, but these errors were encountered: