|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-02-13 17:39 UTC] JaxkDev at gmail dot com
[2021-02-16 11:08 UTC] nikic@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: dmitry
[2021-02-17 08:51 UTC] dmitry@php.net
[2021-02-17 08:51 UTC] dmitry@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
Description: ------------ The following code crashes with PHP 8.0.2 ZTS DEBUG when opcache is enabled using opcache.jit=1205. This happens on both Windows and Linux. Test script: --------------- <?php final class Message { public $qr = false; public $opcode = 0; public $aa = false; } echo "Starting...\n"; function headerToBinary(Message $message) { $flags = 0; $flags = ($flags << 1) | ($message->qr ? 1 : 0); $flags = ($flags << 4) | $message->opcode; var_dump($flags); $flags = ($flags << 1) | ($message->aa ? 1 : 0); } headerToBinary(new Message()); echo "PROBLEM NOT REPRODUCED !\n"; Expected result: ---------------- Starting... int(0) PROBLEM NOT REPRODUCED ! Actual result: -------------- In release mode --------------- Starting... UNKNOWN:0 PHP Fatal error: Uncaught TypeError: Unsupported operand types: null << int in /home/runner/work/php-8-jit-bug-1/php-8-jit-bug-1/reproduce.php:20 Stack trace: #0 /home/runner/work/php-8-jit-bug-1/php-8-jit-bug-1/reproduce.php(23): headerToBinary() #1 {main} thrown in /home/runner/work/php-8-jit-bug-1/php-8-jit-bug-1/reproduce.php on line 20 In debug mode ------------- Starting... UNKNOWN:0 php: /tmp/php-build/source/8.0.2/Zend/zend_operators.c:345: zendi_try_get_long: Assertion `0' failed. Aborted (core dumped)