From 617c5700ca520d80fd25fc0fc9f2389394a46150 Mon Sep 17 00:00:00 2001 From: Somebody Whoisbored <13044396+shadowninja108@users.noreply.github.com> Date: Sun, 5 Nov 2023 04:32:17 -0700 Subject: [PATCH] Better handle instruction aborts when hitting unmapped memory (#5869) * Adjust ARMeilleure to better handle instruction aborts when hitting unmapped memory * Update src/ARMeilleure/Decoders/Decoder.cs Co-authored-by: gdkchan --------- Co-authored-by: gdkchan --- src/ARMeilleure/Decoders/Decoder.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ARMeilleure/Decoders/Decoder.cs b/src/ARMeilleure/Decoders/Decoder.cs index 6d07827a22..66d286928a 100644 --- a/src/ARMeilleure/Decoders/Decoder.cs +++ b/src/ARMeilleure/Decoders/Decoder.cs @@ -38,7 +38,9 @@ namespace ARMeilleure.Decoders { block = new Block(blkAddress); - if ((dMode != DecoderMode.MultipleBlocks && visited.Count >= 1) || opsCount > instructionLimit || !memory.IsMapped(blkAddress)) + if ((dMode != DecoderMode.MultipleBlocks && visited.Count >= 1) || + opsCount > instructionLimit || + (visited.Count > 0 && !memory.IsMapped(blkAddress))) { block.Exit = true; block.EndAddress = blkAddress;