From 852e93aa74e153ee516819a9fa226d28f6ab7fca Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Mon, 1 Jun 2026 16:23:40 +0200 Subject: [PATCH] Core: Fix dereference of invalid iterator --- FEXCore/Source/Interface/Core/Core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FEXCore/Source/Interface/Core/Core.cpp b/FEXCore/Source/Interface/Core/Core.cpp index 1833efe95..b9aa7407f 100644 --- a/FEXCore/Source/Interface/Core/Core.cpp +++ b/FEXCore/Source/Interface/Core/Core.cpp @@ -575,7 +575,7 @@ ContextImpl::GenerateIR(FEXCore::Core::InternalThreadState* Thread, uint64_t Gue bool BlockInForceTSOValidRange = false; auto InstForceTSOIt = ForceTSOInstructions.end(); if (ForceTSOValidRanges.Contains({Block.Entry, Block.Entry + Block.Size})) { - if (auto It = ForceTSOInstructions.lower_bound(Block.Entry); *It < Block.Entry + Block.Size) { + if (auto It = ForceTSOInstructions.lower_bound(Block.Entry); It != ForceTSOInstructions.end() && *It < Block.Entry + Block.Size) { InstForceTSOIt = It; BlockInForceTSOValidRange = true; }