mirror of
https://github.com/php/php-src.git
synced 2025-01-26 13:44:22 +08:00
Fix bug #73668
Not bothering to implement special handling to get an accurate range for this case.
This commit is contained in:
parent
d7e7f74b24
commit
76c4a3db08
6
NEWS
6
NEWS
@ -2,10 +2,14 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2017, PHP 7.1.1
|
||||
|
||||
- Opcache:
|
||||
- Core:
|
||||
. Fixed bug #73663 ("Invalid opcode 65/16/8" occurs with a variable created
|
||||
with list()). (Laruence)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #73654 (Segmentation fault in zend_call_function). (Nikita)
|
||||
. Fixed bug #73668 ("SIGFPE Arithmetic exception" in opcache when divide by
|
||||
minus 1). (Nikita)
|
||||
|
||||
01 Dec 2016, PHP 7.1.0
|
||||
|
||||
|
@ -610,6 +610,10 @@ static int zend_inference_calc_binary_op_range(
|
||||
if (op2_min <= 0 && op2_max >= 0) {
|
||||
break;
|
||||
}
|
||||
if (op1_min == ZEND_LONG_MIN && op2_max == -1) {
|
||||
/* Avoid ill-defined division, which may trigger SIGFPE. */
|
||||
break;
|
||||
}
|
||||
t1 = op1_min / op2_min;
|
||||
t2 = op1_min / op2_max;
|
||||
t3 = op1_max / op2_min;
|
||||
|
8
ext/opcache/tests/bug73668.phpt
Normal file
8
ext/opcache/tests/bug73668.phpt
Normal file
@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Bug #73668: "SIGFPE Arithmetic exception" in opcache when divide by minus 1
|
||||
--FILE--
|
||||
<?php
|
||||
$a/-1;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: a in %s on line %d
|
Loading…
Reference in New Issue
Block a user