Bug #79798 [NEW]: "Uncaught TypeError: Illegal offset type" with PHP 8.0-dev JIT on Windows

From: Date: Mon, 06 Jul 2020 07:50:17 +0000
Subject: Bug #79798 [NEW]: "Uncaught TypeError: Illegal offset type" with PHP 8.0-dev JIT on Windows
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227832@lists.php.net to get a copy of this message
From: sebastian Operating system: Windows PHP version: 8.0Git-2020-07-06 (Git) Package: Scripting Engine problem Bug Type: Bug Bug description:"Uncaught TypeError: Illegal offset type" with PHP 8.0-dev JIT on Windows Description: ------------ The error shown below is triggered while running the tests for PHPUnit 9.3 (master) with PHP 8.0-dev and JIT (opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1205, opcache.jit_buffer_size=4096M) on Windows: PHP Fatal error: Uncaught TypeError: Illegal offset type in D:\a\phpunit\phpunit\vendor\phpunit\php-token-stream\src\Token\Stream.php:658 Stack trace: #0 D:\a\phpunit\phpunit\vendor\phpunit\php-token-stream\src\Token\Stream.php(622): PHP_Token_Stream->addFunctionToMap() #1 D:\a\phpunit\phpunit\vendor\phpunit\php-token-stream\src\Token\Stream.php(175): PHP_Token_Stream->parse() #2 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\File.php(478): PHP_Token_Stream->getClasses() #3 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\File.php(354): SebastianBergmann\CodeCoverage\Node\File->processClasses() #4 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\File.php(145): SebastianBergmann\CodeCoverage\Node\File->calculateStatistics() #5 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\Directory.php(165): SebastianBergmann\CodeCoverage\Node\File->__construct() #6 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\Builder.php(59): SebastianBergmann\CodeCoverage\Node\Directory->addFile() #7 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\Builder.php(63): SebastianBergmann\CodeCoverage\Node\Builder->addItems() #8 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\Builder.php(63): SebastianBergmann\CodeCoverage\Node\Builder->addItems() #9 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\Builder.php(63): SebastianBergmann\CodeCoverage\Node\Builder->addItems() #10 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Node\Builder.php(44): SebastianBergmann\CodeCoverage\Node\Builder->addItems() #11 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\CodeCoverage.php(147): SebastianBergmann\CodeCoverage\Node\Builder->build() #12 D:\a\phpunit\phpunit\vendor\phpunit\php-code-coverage\src\Report\Clover.php(55): SebastianBergmann\CodeCoverage\CodeCoverage->getReport() #13 D:\a\phpunit\phpunit\src\TextUI\TestRunner.php(706): SebastianBergmann\CodeCoverage\Report\Clover->process() #14 D:\a\phpunit\phpunit\src\TextUI\Command.php(134): PHPUnit\TextUI\TestRunner->run() #15 D:\a\phpunit\phpunit\src\TextUI\Command.php(94): PHPUnit\TextUI\Command->run() #16 D:\a\phpunit\phpunit\phpunit(61): PHPUnit\TextUI\Command::main() #17 {main} thrown in D:\a\phpunit\phpunit\vendor\phpunit\php-token-stream\src\Token\Stream.php on line 658 This is the GitHub Action in question: https://github.com/sebastianbergmann/phpunit/runs/840483759?check_suite_focus=true The code in question looks like this: 656 private function addFunctionToMap($name, $startLine, $endLine): void 656 { 657 for ($line = $startLine; $line <= $endLine; $line++) { 658 $this->lineToFunctionMap[$line] = $name; 659 } 660 } https://github.com/sebastianbergmann/php-token-stream/blob/4.0.3/src/Token/Stream.php#L658 The error is not triggered with PHP 8.0-dev and JIT on Linux (or with any other PHP configuration that is tested against in PHPUnit's CI pipeline). -- Edit bug report at https://bugs.php.net/bug.php?id=79798&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79798&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79798&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79798&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79798&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79798&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79798&r=support Expected behavior: https://bugs.php.net/fix.php?id=79798&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79798&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79798&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79798&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79798&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79798&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79798&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79798&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79798&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79798&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79798&r=mysqlcfg

« previous php.bugs (#227832) next »