Bug #80861 [NEW]: erronous array key overflow in 2D array (only with JIT)

From: Date: Sun, 14 Mar 2021 08:47:57 +0000
Subject: Bug #80861 [NEW]: erronous array key overflow in 2D array (only with JIT)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232701@lists.php.net to get a copy of this message
From: tbali0524 at gmail dot com Operating system: Windows 10 (x86_64) PHP version: 8.0.3 Package: JIT Bug Type: Bug Bug description:erronous array key overflow in 2D array (only with JIT) Description: ------------ Below code is excerpt from my implementation of D. Knuth's DLX algorithm for exact cover solver, run from CLI - without JIT, the code runs fine (with the code excerpt in this bug report, the output is nothing.) - with JIT, it fails with tons of warnings like PHP Warning: Undefined array key 1235698926592 in C:\Coding\v\jit_bug.php on line 95 - but array keys are confirmed to be within bounds, possible overflow in JIT? - error is not present if the 2D array is much smaller - PHP versions tested: v8.0.3, v8.0.2 (installed via XAMPP) - OS: Windows 10 (x86_64) - Invoke: php jit_bug.php > out.txt 2>&1 - PHP.ini settings: opcache.enable=1 opcache.enable_cli=1 opcache.jit_buffer_size=128M opcache.jit=tracing Test script: --------------- link to test script (to be tun CLI only, so rename after download) https://www.aviationfanatic.com/tmp/jit_bug.php.txt Expected result: ---------------- with the code excerpt in this bug report, the output is nothing. Actual result: -------------- with JIT, it fails with tons of warnings like PHP Warning: Undefined array key 1235698926592 in C:\Coding\v\jit_bug.php on line 92 - but array keys are confirmed to be within bounds -- Edit bug report at https://bugs.php.net/bug.php?id=80861&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80861&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80861&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80861&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80861&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80861&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80861&r=support Expected behavior: https://bugs.php.net/fix.php?id=80861&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80861&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80861&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80861&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80861&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80861&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80861&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80861&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80861&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80861&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80861&r=mysqlcfg

« previous php.bugs (#232701) next »