mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
@@ -6982,13 +6982,13 @@ static int zend_jit_identical(zend_jit_ctx *jit,
|
||||
|
||||
if (opline->op1_type == IS_CV && (op1_info & MAY_BE_UNDEF)) {
|
||||
ir_ref op1 = jit_ZVAL_ADDR(jit, op1_addr);
|
||||
op1 = zend_jit_zval_check_undef(jit, op1, opline->op1.var, NULL, 0);
|
||||
op1 = zend_jit_zval_check_undef(jit, op1, opline->op1.var, opline, 0);
|
||||
op1_info |= MAY_BE_NULL;
|
||||
op1_addr = ZEND_ADDR_REF_ZVAL(op1);
|
||||
}
|
||||
if (opline->op2_type == IS_CV && (op2_info & MAY_BE_UNDEF)) {
|
||||
ir_ref op2 = jit_ZVAL_ADDR(jit, op2_addr);
|
||||
op2 = zend_jit_zval_check_undef(jit, op2, opline->op2.var, NULL, 0);
|
||||
op2 = zend_jit_zval_check_undef(jit, op2, opline->op2.var, opline, 0);
|
||||
op2_info |= MAY_BE_NULL;
|
||||
op2_addr = ZEND_ADDR_REF_ZVAL(op2);
|
||||
}
|
||||
|
||||
21
ext/opcache/tests/jit/identical_004.phpt
Normal file
21
ext/opcache/tests/jit/identical_004.phpt
Normal file
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
JIT IDENTICAL: 004 undefined error
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.jit_buffer_size=1M
|
||||
opcache.protect_memory=1
|
||||
--FILE--
|
||||
<?php
|
||||
function foo() {
|
||||
$y === $y;
|
||||
}
|
||||
foo();
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: Undefined variable $y in %sidentical_004.php on line 3
|
||||
|
||||
Warning: Undefined variable $y in %sidentical_004.php on line 3
|
||||
DONE
|
||||
Reference in New Issue
Block a user