소스 검색

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 <gab.dark.100@gmail.com>

---------

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Somebody Whoisbored 2 년 전
부모
커밋
617c5700ca
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/ARMeilleure/Decoders/Decoder.cs

+ 3 - 1
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;