|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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.
 [2023-06-09 09:05 UTC] hfdifguojoweeui322 at gmail dot com
That was so amazing article I loved that.

More info : - (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 07:01:29 2024 UTC