Skip to content

Commit

Permalink
Fix BIND_STATIC may_throw check
Browse files Browse the repository at this point in the history
This is supposed to index into arData, not the HashTable itself.
  • Loading branch information
nikic committed Sep 14, 2021
1 parent 753645a commit 1b376b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/opcache/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -4559,7 +4559,7 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze
/* Destructor may throw. */
return 1;
} else {
zval *value = (zval*)((char*)op_array->static_variables + (opline->extended_value & ~(ZEND_BIND_REF|ZEND_BIND_IMPLICIT)));
zval *value = (zval*)((char*)op_array->static_variables->arData + (opline->extended_value & ~(ZEND_BIND_REF|ZEND_BIND_IMPLICIT)));
/* May throw if initializer is CONSTANT_AST. */
return Z_TYPE_P(value) == IS_CONSTANT_AST;
}
Expand Down

0 comments on commit 1b376b0

Please sign in to comment.