Bug #81249 [Com]: Intermittent property assignment failure with JIT enabled
Edit report at https://bugs.php.net/bug.php?id=81249&edit=1
ID: 81249
Comment by: hao dot sun at arm dot com
Reported by: smokey101stair at gmail dot com
Summary: Intermittent property assignment failure with JIT
enabled
Status: Verified
Type: Bug
Package: JIT
Operating System: Ubuntu 20.04
PHP Version: 8.0.8
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
FYI.
1. This bug occurred for master branch as well, for both JIT/x86 and JIT/arm64.
2. In my test, the test case can be further downsized, that is, Lines 85 to 87 can be removed as
well, i.e. https://gist.github.com/TRowbotham/4dc7c8dc1714edab69019e0d71c17c02#file-jit1-php-L85-L87
3. I suspect this bug is due to "hot side exit".
1) -d opcache.jit_hot_side_exit=0, this bug is gone.
2) -d opcache.jit_hot_side_exit=N, the smaller the number we assigned, the earlier this bug showed
up.
Previous Comments:
------------------------------------------------------------------------
[2021-07-12 03:46:12] smokey101stair at gmail dot com
Description:
------------
PHP 8.0.8 (cli) (built: Jul 4 2021 21:22:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
PHP was compiled using PHPBrew, if that makes a difference.
opcache.jit=1255
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.jit_buffer_size=256M
zend.assertions=1
The test script decodes EUC-JP text to Unicode Code Points. I tried to reduce the script as much as
possible, but it was very temperamental when removing if statements.
When processing the first byte, 8F, the assignment at https://gist.github.com/TRowbotham/4dc7c8dc1714edab69019e0d71c17c02#file-jit1-php-L90
fails intermittently. This leaves $this->lead set to its initial value of 0, which eventually
leads to the script returning an error instead of a code point.
The script is expected to transform the EUC-JP encoded bytes to the Unicode U+2D8 code point.
Test script:
---------------
https://gist.github.com/TRowbotham/4dc7c8dc1714edab69019e0d71c17c02
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81249&edit=1
Thread (5 messages)