FS#52074 - [php] crash with OPCache
Attached to Project:
Arch Linux
Opened by Sebastiaan Lokhorst (lonaowna) - Wednesday, 07 December 2016, 20:27 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 13 January 2017, 00:32 GMT
Opened by Sebastiaan Lokhorst (lonaowna) - Wednesday, 07 December 2016, 20:27 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 13 January 2017, 00:32 GMT
|
Details
Since PHP 7.1, when enabling OPCache, the following trivial
piece of code crashes:
<?php function f($x, $y){ if($y<0) $x/$y; } ?> Reproduce by enabling OPCache with the following lines in /etc/php/php.ini: zend_extension=opcache.so opcache.enable=1 opcache.enable_cli=1 Create the file mentioned above and run it with "php file.php". (You might need to run it a few times; it seems to matter if it's ran from the cached version or not.) On PHP 7.0, this runs fine. (gives no output as expected) On PHP 7.1, the following happens: Floating point exception (core dumped) |
This task depends upon
Closed by Doug Newgard (Scimmia)
Friday, 13 January 2017, 00:32 GMT
Reason for closing: Fixed
Additional comments about closing: php 7.1.1RC1-1
Friday, 13 January 2017, 00:32 GMT
Reason for closing: Fixed
Additional comments about closing: php 7.1.1RC1-1
I don't know what opcache.enable_cli=1 does, but this script crashes with it set to 1, and doesn't with it set to 0.
To be clear: it also crashes when I run the same PHP script through Apache (with OPCache enabled), but I thought this was simpler to reproduce.
https://secure.php.net/manual/en/opcache.configuration.php#ini.opcache.enable-cli
http://git.php.net/?p=php-src.git;a=commit;h=76c4a3db080e347663a3999ae38b78cf26dd4c84
http://git.php.net/?p=php-src.git;a=commit;h=3b79f8f408ab090825bc15656e517746fdc43db9