forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix phpGH-17140 (Assertion failure in JIT trace exit with ZEND_FETCH_…
…DIM_FUNC_ARG) ZEND_FETCH_DIM_FUNC_ARG should also be repeated on undefined access, consistent to how ZEND_FETCH_DIM_R is handled. The opcode was just missing from the assertion list.
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--TEST-- | ||
GH-17140 (Assertion failure in JIT trace exit with ZEND_FETCH_DIM_FUNC_ARG) | ||
--EXTENSIONS-- | ||
opcache | ||
--INI-- | ||
opcache.jit=1254 | ||
opcache.jit_buffer_size=32M | ||
opcache.jit_hot_func=1 | ||
opcache.jit_hot_side_exit=1 | ||
--FILE-- | ||
<?php | ||
namespace Foo; | ||
function test() { | ||
$a['x'][1] = true; | ||
for ($fusion = 0; $i < 3; $i++) { | ||
var_dump($a['x'][0]); | ||
} | ||
} | ||
test(); | ||
?> | ||
--EXPECTF-- | ||
Warning: Undefined variable $i in %s on line %d | ||
|
||
Warning: Undefined array key 0 in %s on line %d | ||
NULL | ||
|
||
Warning: Undefined variable $i in %s on line %d | ||
|
||
Warning: Undefined array key 0 in %s on line %d | ||
NULL | ||
|
||
Warning: Undefined array key 0 in %s on line %d | ||
NULL |