From 9cb48c8fa151a643b448412e053b1e7e60ae3137 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 18 Sep 2024 09:33:54 +0300 Subject: [PATCH] Update IR IR commit: 84a4b4259a0ea246f82e0d8a3d79032af75b5267 This fixes GH-15903: Core dumped in ext/opcache/jit/ir/ir_ra.c --- ext/opcache/jit/ir/ir_cfg.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ext/opcache/jit/ir/ir_cfg.c b/ext/opcache/jit/ir/ir_cfg.c index ecb98ad6b50..c2893dcf292 100644 --- a/ext/opcache/jit/ir/ir_cfg.c +++ b/ext/opcache/jit/ir/ir_cfg.c @@ -1033,6 +1033,20 @@ next: bb->loop_depth = loop_depth; if (bb->flags & (IR_BB_ENTRY|IR_BB_LOOP_WITH_ENTRY)) { loop->flags |= IR_BB_LOOP_WITH_ENTRY; + if (loop_depth > 1) { + /* Set IR_BB_LOOP_WITH_ENTRY flag for all the enclosing loops */ + bb = &blocks[loop->loop_header]; + while (1) { + if (bb->flags & IR_BB_LOOP_WITH_ENTRY) { + break; + } + bb->flags |= IR_BB_LOOP_WITH_ENTRY; + if (bb->loop_depth == 1) { + break; + } + bb = &blocks[loop->loop_header]; + } + } } } }