1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/ext/opcache/tests/jit/reg_alloc_021.phpt
Dmitry Stogov aa7465a435 Fixed missed type store
Fixes oss-fuzz #63601
2023-11-01 14:26:01 +03:00

20 lines
440 B
PHP

--TEST--
Register Alloction 021: TMP variables captured by live_ranges have to be stored
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
$a = 0;
for($i = 5; $i >= 0; $i--) {
$a = 1 + ++$a - 5 % $i;
}
?>
--EXPECTF--
Fatal error: Uncaught DivisionByZeroError: Modulo by zero in %sreg_alloc_021.php:4
Stack trace:
#0 {main}
thrown in %sreg_alloc_021.php on line 4