Frontend: fix nondeterminism by rolling back DecodedMaxAddress on error

Otherwise GuestSize ends up different across compiles of the same valid code
extents, including the copy of it baked in JITCodeTail of the host code itself.
This commit is contained in:
Pierre-Loup A. Griffais committed 2026-09-05 21:53:30 -07:00
1 parent abec314720
commit 96d955e7b1
2 files changed
+4 -1

No files matched your search

@@ -1494,6 +1494,9 @@ void Decoder::DecodeLoop(const uint8_t* _InstStream, uint64_t GuestSizePause) {
TotalInstructions -= BlockIt->NumInstructions;
DecodedSize = BlockStartOffset;
InstStream -= PCOffset;
if (DecodedMaxAddress == OpEndAddress) {
DecodedMaxAddress -= PCOffset;
}
EraseBlock = true;
} else {
LogMan::Msg::EFmt("{} instruction in entry block: {:X}",