From e488f7b0eb5aa0dbc396a17821386d914899e988 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 19 Sep 2022 17:17:53 +0300 Subject: [PATCH] Reorder conditions to avoid valgrind "Conditional jump or move depends on uninitialised value" warning. --- ext/opcache/ZendAccelerator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index c195ad7d2cb..028a960b4e0 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2214,9 +2214,10 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) /* see bug #15471 (old BTS) */ if (persistent_script->script.filename) { - if (!EG(current_execute_data) || !EG(current_execute_data)->opline || + if (!EG(current_execute_data) || !EG(current_execute_data)->func || !ZEND_USER_CODE(EG(current_execute_data)->func->common.type) || + !EG(current_execute_data)->opline || EG(current_execute_data)->opline->opcode != ZEND_INCLUDE_OR_EVAL || (EG(current_execute_data)->opline->extended_value != ZEND_INCLUDE_ONCE && EG(current_execute_data)->opline->extended_value != ZEND_REQUIRE_ONCE)) {