Bug #78341 [NEW]: Opcache DFA pass over-optimized?
| From: | jfcherng at gmail dot com | Date: | Sun, 28 Jul 2019 12:26:34 +0000 |
| Subject: | Bug #78341 [NEW]: Opcache DFA pass over-optimized? | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221957@lists.php.net to get a copy of this message | ||
From: jfcherng at gmail dot com
Operating system: Win7 x64
PHP version: 7.3.8RC1
Package: opcache
Bug Type: Bug
Bug description:Opcache DFA pass over-optimized?
Description:
------------
PHP 7.3.8RC1 (and 7.4snapshot) emits notices after I update
symfony/var-dumper to v4.3.3 today.
"zvalIsRef in vendor\symfony\var-dumper\Cloner\VarCloner.php on line
268"
The variable "zvalIsRef" around VarCloner.php on line 268 is actually
obviously defined. So I have much confidence this is a PHP engine's
problem.
After some tests, this seems to be the problematic commit
https://github.com/php/php-src/commit/e7a83ec8dff962ea624508f18b9b10f5add030cc
. It's parent 3fa9f9cfae2cedd7b6d26b6487dd156321243ab7 works fine in my
test.
I am sorry that I am not able to give a smaller test case.
Test script:
---------------
<?php
declare(strict_types=1);
// remember to set opcache.enable_cli=1 if this test is done in cli
// composer require symfony/var-dumper:v4.3.3
require __DIR__ . '/vendor/autoload.php';
use Symfony\Component\VarDumper\Cloner\VarCloner;
$myVar = new ArrayObject();
$cloner = new VarCloner();
$data = $cloner->cloneVar($myVar);
Expected result:
----------------
no notice is emitted.
Actual result:
--------------
Notice: Undefined variable: zvalIsRef in
vendor\symfony\var-dumper\Cloner\VarCloner.php on line 268
Notice: Undefined variable: zvalIsRef in
vendor\symfony\var-dumper\Cloner\VarCloner.php on line 268
--
Edit bug report at https://bugs.php.net/bug.php?id=78341&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78341&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78341&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78341&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78341&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78341&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78341&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78341&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78341&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78341&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78341&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78341&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78341&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78341&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78341&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78341&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78341&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78341&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78341&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78341&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78341&r=mysqlcfg