|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80588 opcache causes include() to include an utterly random unrelated file
Submitted: 2021-01-04 18:44 UTC Modified: 2021-02-23 11:56 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php4fan at gmail dot com Assigned:
Status: Open Package: opcache
PHP Version: 7.4.13 OS: linux debian 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php4fan at gmail dot com
New email:
PHP Version: OS:


 [2021-01-04 18:44 UTC] php4fan at gmail dot com
In my code I have the following code executed many times:


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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-23 11:47 UTC] php4fan at gmail dot com
Why is this being ignored? The impact of this is devastating.
 [2021-02-23 11:56 UTC]
It's unlikely this can be addressed without a way to reproduce this issue.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Apr 01 22:03:37 2023 UTC