mirror of
https://github.com/php/php-src.git
synced 2026-04-05 15:12:39 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fixed NAN handling in SCCP
This commit is contained in:
@@ -182,7 +182,8 @@ static void set_value(scdf_ctx *scdf, sccp_ctx *ctx, int var, zval *new) {
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
ZEND_ASSERT(zend_is_identical(value, new));
|
||||
ZEND_ASSERT(zend_is_identical(value, new) ||
|
||||
(Z_TYPE_P(value) == IS_DOUBLE && Z_TYPE_P(new) == IS_DOUBLE && isnan(Z_DVAL_P(value)) && isnan(Z_DVAL_P(new))));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
16
ext/opcache/tests/opt/sccp_036.phpt
Normal file
16
ext/opcache/tests/opt/sccp_036.phpt
Normal file
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
SCCP 036: NAN handling
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=-1
|
||||
--FILE--
|
||||
<?php
|
||||
function foo() {
|
||||
$y=NAN;
|
||||
for(;x;)for(;$y=1;);
|
||||
}
|
||||
?>
|
||||
DONE
|
||||
--EXPECT--
|
||||
DONE
|
||||
Reference in New Issue
Block a user