com php-src: Fixed bug #75370 (Webserver hangs on valid PHP text): NEWS ext/opcache/Optimizer/sccp.c ext/opcache/tests/bug75370.phpt

From: Date: Fri, 13 Oct 2017 10:18:10 +0000
Subject: com php-src: Fixed bug #75370 (Webserver hangs on valid PHP text): NEWS ext/opcache/Optimizer/sccp.c ext/opcache/tests/bug75370.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99730@lists.php.net to get a copy of this message
Commit: e4f7ff9c0f35cb69795227296e8f902f88d124a5 Author: Xinchen Hui <laruence@gmail.com> Fri, 13 Oct 2017 18:18:10 +0800 Parents: e50cc4d3af76ae20fed2fc9c02029c3abfacc2e0 Branches: PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e4f7ff9c0f35cb69795227296e8f902f88d124a5 Log: Fixed bug #75370 (Webserver hangs on valid PHP text) Bugs: https://bugs.php.net/75370 Changed paths: M NEWS M ext/opcache/Optimizer/sccp.c A ext/opcache/tests/bug75370.phpt Diff: diff --git a/NEWS b/NEWS index 8578801..c3d3105 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ PHP NEWS . Fixed bug #75301 (Exif extension has built in revision version). (Peter Kokot) +- Opcache: + . Fixed bug #75370 (Webserver hangs on valid PHP text). (Laruence) + - Openssl: . Fixed bug #75363 (openssl_x509_parse leaks memory). (Bob) diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index e061e20..c6aeebc 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -1505,7 +1505,9 @@ static int replace_constant_operands(sccp_ctx *ctx) { } if (try_replace_op2(ctx, opline, ssa_op, i, value)) { ZEND_ASSERT(ssa_op->op2_def == -1); - zend_ssa_unlink_use_chain(ssa, use, ssa_op->op2_use); + if (ssa_op->op2_use != ssa_op->op1_use) { + zend_ssa_unlink_use_chain(ssa, use, ssa_op->op2_use); + } ssa_op->op2_use = -1; ssa_op->op2_use_chain = -1; } diff --git a/ext/opcache/tests/bug75370.phpt b/ext/opcache/tests/bug75370.phpt new file mode 100644 index 0000000..89518de --- /dev/null +++ b/ext/opcache/tests/bug75370.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #75370 (Webserver hangs on valid PHP text) +--FILE-- +<?php +function test() +{ + $success = true; + $success = $success AND true; + return $success; +} + +var_dump(test()); +?> +--EXPECT-- +bool(true)

« previous php.cvs (#99730) next »