Bug #81249 [NEW]: Intermittent property assignment failure with JIT enabled

From: Date: Mon, 12 Jul 2021 03:46:12 +0000
Subject: Bug #81249 [NEW]: Intermittent property assignment failure with JIT enabled
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234957@lists.php.net to get a copy of this message
From:             smokey101stair at gmail dot com
Operating system: Ubuntu 20.04
PHP version:      8.0.8
Package:          JIT
Bug Type:         Bug
Bug description:Intermittent property assignment failure with JIT enabled

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 bug report at https://bugs.php.net/bug.php?id=81249&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81249&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81249&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81249&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81249&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81249&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81249&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81249&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81249&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81249&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81249&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81249&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81249&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81249&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81249&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81249&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81249&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81249&r=mysqlcfg


Thread (5 messages)

« previous php.bugs (#234957) next »