Skip to content

Commit 5b9a748

Browse files
committed
Fix another crash on a chain of page faults in the middle of the dynamic core caching the next block
1 parent 5460a26 commit 5b9a748

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cpu/paging.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,16 @@ bool PAGING_MakePhysPage(Bitu & page) {
13251325
// check the page directory entry for this address
13261326
X86PageEntry dir_entry;
13271327
dir_entry.load = phys_readd(GetPageDirectoryEntryAddr(page<<12));
1328+
#ifndef C_DBP_PAGE_FAULT_QUEUE_WIPE
13281329
if (!dir_entry.block.p) return false;
1330+
#else
1331+
if (!dir_entry.block.p) {
1332+
// During page fault wipe this can fail but we still return true to avoid a crash caused by MakeCodePage failing with "DYNX86:Can't find physpage" due to this.
1333+
// This is fine because the page fault wipe will revert state back to what it was during the page fault anyway.
1334+
if (!DOSBOX_IsWipingPageFaultQueue)
1335+
return false;
1336+
}
1337+
#endif
13291338

13301339
// check the page table entry
13311340
X86PageEntry tbl_entry;

0 commit comments

Comments
 (0)