Bug #78874 [NEW]: 'opcache.preload' fires function magically with stange param

From: Date: Wed, 27 Nov 2019 15:51:53 +0000
Subject: Bug #78874 [NEW]: 'opcache.preload' fires function magically with stange param
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223907@lists.php.net to get a copy of this message
From: bugreport at example dot com Operating system: PHP version: 7.4Git-2019-11-27 (Git) Package: opcache Bug Type: Bug Bug description:'opcache.preload' fires function magically with stange param Description: ------------ that below is a simplified version of our 'opcache.preload' with no active code our build-environemt is calling 4 cli scripts and a forground httpd using the same php.ini under the same user and global_preload_msg() is called multiple times with an arbitary string for $preload_file sometimes this happens only one time, sometimes every start of a cli-script triggers global_preload_msg() in normal operations the function receives the return value of opcache_compile_file and the full path compiled file besides that strange calls of global_preload_msg() everything is working fine meaning all invocations of the cli-scripts and the webserver are logging success for each expected call of opcache_compile_file() so the question why global_preload_msg() is executed at all even when the 'opcache.preload' only contains the function itself which so couldn't fire for now i wrapped a file_exists() around the whole function code to silence it that is pretty new and didn't happen with older git-snapshots Test script: --------------- <?php declare(strict_types=1); function global_preload_msg(string $preload_file, bool $status): void { if($status === FALSE ) { switch($status) { case TRUE: $status_out = 'OK'; break; case FALSE: $status_out = 'FAILED'; break; } error_log("PHP-PRELOAD " . strtoupper(PHP_SAPI) . ": $status_out '" . str_replace(__DIR__, '', $preload_file) . "'"); } } ?> Expected result: ---------------- empty error log Actual result: -------------- error_log after the code-coverage run: [27-Nov-2019 12:21:05 UTC] PHP-PRELOAD CLI: FAILED '07f6aea80a' [27-Nov-2019 12:21:05 UTC] PHP-PRELOAD CLI: FAILED '8903342d78' [27-Nov-2019 12:21:06 UTC] PHP-PRELOAD CLI: FAILED '0337428158' [27-Nov-2019 12:21:07 UTC] PHP-PRELOAD CLI: FAILED '3afe1bdd1d' -- Edit bug report at https://bugs.php.net/bug.php?id=78874&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78874&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78874&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78874&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78874&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78874&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78874&r=support Expected behavior: https://bugs.php.net/fix.php?id=78874&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78874&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78874&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78874&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78874&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78874&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78874&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78874&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78874&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78874&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78874&r=mysqlcfg

« previous php.bugs (#223907) next »