From 26bf7a1130fa5b2b3dad270baf8cec9f9497645a Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Sun, 21 Jul 2024 15:33:25 +0200 Subject: [PATCH] JIT: Fix infinite loop in copy prop GT_COMMA update logic --- src/coreclr/jit/copyprop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/copyprop.cpp b/src/coreclr/jit/copyprop.cpp index f3c858bc9bcaa..7953cbd8f5f4f 100644 --- a/src/coreclr/jit/copyprop.cpp +++ b/src/coreclr/jit/copyprop.cpp @@ -296,7 +296,7 @@ bool Compiler::optCopyProp( JITDUMP(" Updating COMMA parent VN [%06u]\n", dspTreeID(parent)); ValueNumPair op1Xvnp = vnStore->VNPExceptionSet(parent->AsOp()->gtOp1->gtVNPair); parent->SetVNs(vnStore->VNPWithExc(parent->AsOp()->gtOp2->gtVNPair, op1Xvnp)); - parent = tree->gtGetParent(nullptr); + parent = parent->gtGetParent(nullptr); } } gtUpdateSideEffects(stmt, tree);