From cf8a2aa50a5a96b2ef40edd0f3a3f6065abc56eb Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 10 Jun 2023 19:24:44 +0200 Subject: [PATCH] Added a sanity check to mem_invalidate_range() when compiled with the new recompiler, fixes segmentation fault on with OS/2 on IBM PS/2 Model 80. --- src/mem/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/mem.c b/src/mem/mem.c index c6010c8a1..6c994d156 100644 --- a/src/mem/mem.c +++ b/src/mem/mem.c @@ -2219,7 +2219,7 @@ mem_invalidate_range(uint32_t start_addr, uint32_t end_addr) if (p) { p->dirty_mask = 0xffffffffffffffffULL; - if (p->byte_dirty_mask) + if ((p->mem != page_ff) && p->byte_dirty_mask) memset(p->byte_dirty_mask, 0xff, 64 * sizeof(uint64_t)); if (!page_in_evict_list(p))