Bug #81206 [NEW]: JIT: Crash on require() when running two instances of the same PHP executable

From: Date: Mon, 28 Jun 2021 20:05:54 +0000
Subject: Bug #81206 [NEW]: JIT: Crash on require() when running two instances of the same PHP executable
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234674@lists.php.net to get a copy of this message
From: dktapps at pmmp dot io Operating system: Windows PHP version: 8.0.7 Package: JIT Bug Type: Bug Bug description:JIT: Crash on require() when running two instances of the same PHP executable Description: ------------ Using the below script with JIT=1205, I'm able to trigger a segfault on require(). This does not happen if JIT is disabled. This only happens on Windows. Test script: --------------- test.php: <?php declare(strict_types=1); system(PHP_BINARY . " -v"); echo "Including script 'Test.php'\n"; require dirname(__DIR__) . '/helpers/Test.php'; echo "Done!\n"; helpers/Test.php: <?php class Test{ public static function doSomething() : void{ $time = time(); while(time() < $time + 10){} echo "done\n"; } } Expected result: ---------------- PHP 8.0.7 (cli) (built: Jun 2 2021 00:40:57) ( NTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.7, Copyright (c) Zend Technologies with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies Including script 'Test.php' Done! Actual result: -------------- As seen in the Windows, JIT=1205 run here: https://github.com/dktapps/php-8-jit-bugs/runs/2935629701?check_suite_focus=true PHP 8.0.7 (cli) (built: Jun 2 2021 00:40:57) ( NTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.7, Copyright (c) Zend Technologies with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies Including script 'Test.php' FAILED: require-second-process.php (-1073741819) -- Edit bug report at https://bugs.php.net/bug.php?id=81206&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81206&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81206&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81206&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81206&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81206&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81206&r=support Expected behavior: https://bugs.php.net/fix.php?id=81206&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81206&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81206&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81206&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81206&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81206&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81206&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81206&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81206&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81206&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81206&r=mysqlcfg

« previous php.bugs (#234674) next »