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

From: Date: Mon, 28 Jun 2021 21:18:49 +0000
Subject: Bug #81206 [Com]: JIT: Crash on require() when running two instances of the same PHP executable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234675@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81206&edit=1 ID: 81206 Comment by: dktapps at pmmp dot io Reported by: dktapps at pmmp dot io Summary: JIT: Crash on require() when running two instances of the same PHP executable Status: Open Type: Bug Package: JIT Operating System: Windows PHP Version: 8.0.7 Block user comment: N Private report: N New Comment: This problem appears to have been caused by https://github.com/php/php-src/pull/6268. Reverting this commit fixes the problem. Previous Comments: ------------------------------------------------------------------------ [2021-06-28 20:05:54] dktapps at pmmp dot io 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 this bug report at https://bugs.php.net/bug.php?id=81206&edit=1

« previous php.bugs (#234675) next »