1
0
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:
Dmitry Stogov
2022-01-10 19:40:22 +03:00
2 changed files with 18 additions and 1 deletions

View File

@@ -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
}

View 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