From eb2e2546eeaf20f9af0b199a1a2c139bd6c4f9e7 Mon Sep 17 00:00:00 2001 From: Dylan Tuttle Date: Tue, 5 Sep 2023 06:50:29 -0700 Subject: [PATCH] Move decReferenceCount out of else block Move a call to decReferenceCount out of an else block because cases existed where the indexChild of the BNDCHKwithSpineCHKEvaluator node wasn't having its reference count decremented Closes: #15436 Signed-off-by: Dylan Tuttle --- runtime/compiler/x/codegen/J9TreeEvaluator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/compiler/x/codegen/J9TreeEvaluator.cpp b/runtime/compiler/x/codegen/J9TreeEvaluator.cpp index 78f1824ecee..ba0064de6b2 100644 --- a/runtime/compiler/x/codegen/J9TreeEvaluator.cpp +++ b/runtime/compiler/x/codegen/J9TreeEvaluator.cpp @@ -3346,10 +3346,9 @@ TR::Register *J9::X86::TreeEvaluator::BNDCHKwithSpineCHKEvaluator(TR::Node *node { cg->evaluate(indexChild); } - else - { - cg->decReferenceCount(indexChild); - } + + cg->decReferenceCount(indexChild); + faultingInstruction = cg->getImplicitExceptionPoint(); } else