-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-17257: UBSAN warning in ext/opcache/jit/zend_jit_vm_helpers.c
EX(opline) / opline can be stale if the IP is not stored, like in this case on a trace enter. We always need to make sure that the opline is up to date to make sure we don't use stale data. Closes GH-17260.
- Loading branch information
Showing
5 changed files
with
47 additions
and
4 deletions.
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
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
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,25 @@ | ||
--TEST-- | ||
GH-17257 (SEGV ext/opcache/jit/zend_jit_vm_helpers.c) | ||
--EXTENSIONS-- | ||
opcache | ||
--INI-- | ||
opcache.jit_buffer_size=32M | ||
opcache.jit=1254 | ||
opcache.jit_hot_func=1 | ||
--FILE-- | ||
<?php | ||
function get_const() { | ||
} | ||
function test() { | ||
call_user_func('get_const', 1); // need an extra arg to trigger the issue | ||
} | ||
function main(){ | ||
for ($i = 0; $i < 10; $i++) { | ||
test(); | ||
} | ||
echo "Done\n"; | ||
} | ||
main(); | ||
?> | ||
--EXPECT-- | ||
Done |