From c3168e622f45bc2b034ea92306e39912d4da6d2b Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Wed, 17 Sep 2025 15:03:40 +0200 Subject: [PATCH] JIT: Add missing containment check for indirect calls --- src/coreclr/jit/lowerxarch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index 51b11fc089cf19..498e0fe936aa4d 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -7696,7 +7696,7 @@ void Lowering::ContainCheckCallOperands(GenTreeCall* call) } else #endif // TARGET_X86 - if (ctrlExpr->isIndir()) + if (ctrlExpr->isIndir() && IsSafeToContainMem(call, ctrlExpr)) { // We may have cases where we have set a register target on the ctrlExpr, but if it // contained we must clear it.