[php-src] master: Fix use-of-uninitialized-value with exception on deprecated const access
Author: Ilija Tovilo (iluuu1994)
Date: 2025-05-02T11:57:16+02:00
Commit: https://github.com/php/php-src/commit/59056937bff9b8e36d460391e770fa1fcfa032dd
Raw diff: https://github.com/php/php-src/commit/59056937bff9b8e36d460391e770fa1fcfa032dd.diff
Fix use-of-uninitialized-value with exception on deprecated const access
Closes GH-18478
Changed paths:
M ext/opcache/jit/zend_jit_vm_helpers.c
Diff:
diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c
index d39a5c44be8b..4348fbd53ad4 100644
--- a/ext/opcache/jit/zend_jit_vm_helpers.c
+++ b/ext/opcache/jit/zend_jit_vm_helpers.c
@@ -380,6 +380,7 @@ static zend_always_inline zend_constant* _zend_quick_get_constant(
zend_deprecated_constant(c, c->name);
CONST_UNPROTECT_RECURSION(c);
if (EG(exception)) {
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
return NULL;
}
}
Thread (1 message)
- Ilija Tovilo