Bug #80782 [NEW]: DASM_S_RANGE_VREG on PHP_INT_MIN-1
| From: | nikic@php.net | Date: | Mon, 22 Feb 2021 08:22:43 +0000 |
| Subject: | Bug #80782 [NEW]: DASM_S_RANGE_VREG on PHP_INT_MIN-1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-232311@lists.php.net to get a copy of this message | ||
From: nikic
Operating system:
PHP version: 8.0.3RC1
Package: JIT
Bug Type: Bug
Bug description:DASM_S_RANGE_VREG on PHP_INT_MIN-1
Description:
------------
php -d opcache.jit_hot_func=1
<?php
define('LONG_MIN', PHP_INT_MIN);
var_dump(LONG_MIN-1);
DASM_S_RANGE_VREG
php: /home/nikic/php/php-src/ext/opcache/jit/zend_jit.c:311:
handle_dasm_error: Assertion `0' failed.
Aborted (core dumped)
The problem seems to be that
https://github.com/php/php-src/blob/fd3692ba41a6338905a38a8007ad61fa380f6fc1/ext/opcache/jit/zend_jit_x86.dasc#L4344-L4350
assumes that res_addr is an integer zval/reg, but here has been
allocated to xmm0 (the result always overflows).
--
Edit bug report at https://bugs.php.net/bug.php?id=80782&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80782&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80782&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80782&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80782&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80782&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80782&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80782&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80782&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80782&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80782&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80782&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80782&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80782&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80782&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80782&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80782&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80782&r=mysqlcfg