소스 검색

Fix read access violation

Roni Kirla 3 년 전
부모
커밋
a13fd5f7cc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/common/address_space.inc

+ 1 - 1
src/common/address_space.inc

@@ -72,7 +72,7 @@ MAP_MEMBER(void)::MapLocked(VaType virt, PaType phys, VaType size, ExtraBlockInf
                 }
             }()};
 
-            if (block_end_predecessor->virt >= virt) {
+            if (block_end_predecessor != blocks.begin() && block_end_predecessor->virt >= virt) {
                 // If this block's start would be overlapped by the map then reuse it as a tail
                 // block
                 block_end_predecessor->virt = virt_end;