Bug #80588 [NEW]: opcache causes include() to include an utterly random unrelated file

From: Date: Mon, 04 Jan 2021 18:44:33 +0000
Subject: Bug #80588 [NEW]: opcache causes include() to include an utterly random unrelated file
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231366@lists.php.net to get a copy of this message
From: php4fan at gmail dot com Operating system: linux debian 9 PHP version: 7.4.13 Package: opcache Bug Type: Bug Bug description:opcache causes include() to include an utterly random unrelated file Description: ------------ In my code I have the following code executed many times: <?php eval(" include("/path/to/a/file_1.php"); "); ?> It is not as direct as that: the evaled string is fetched from a db rather than being a literal, but it's fixed as the above. Under some apparently random circumstances, at the Nth time that gets executed, it executes a completely unrelated file /path/to/another/file_2.php instead of the one whose name is being passed to include(). Disabling opcache fixes the issue. I haven't been able to recreate a minimal, sharable, reproducible test case. With my code it happens systematically 100% of the time that this given script is executed. It looks almost as if, because of a hash collision or something of that sort (uttelry random but at the same time 100% reproducible), the opcache ended up fetching a completely unrelated precompiled piece of bytecode. This is a REGRESSION, it happens with PHP 7.4.11 but not with PHP 5.6 -- Edit bug report at https://bugs.php.net/bug.php?id=80588&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80588&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80588&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80588&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80588&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80588&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80588&r=support Expected behavior: https://bugs.php.net/fix.php?id=80588&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80588&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80588&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80588&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80588&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80588&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80588&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80588&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80588&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80588&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80588&r=mysqlcfg

« previous php.bugs (#231366) next »