Merge pull request #5656 from neobrain/fix_invalid_iterator_deref

Core: Fix dereference of invalid iterator
This commit is contained in:
LC authored and GitHub committed 2026-07-06 10:13:04 -04:00
commit 444c37fe2e
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}