Bug #80782 [Asn->Csd]: DASM_S_RANGE_VREG on PHP_INT_MIN-1
Edit report at https://bugs.php.net/bug.php?id=80782&edit=1
ID: 80782
Updated by: dmitry@php.net
Reported by: nikic@php.net
Summary: DASM_S_RANGE_VREG on PHP_INT_MIN-1
-Status: Assigned
+Status: Closed
Type: Bug
Package: JIT
PHP Version: 8.0.3RC1
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b7fa5268e4d9ca7ee4c2ae908b6b45b9517d5921
Log: Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)
Previous Comments:
------------------------------------------------------------------------
[2021-02-22 08:22:43] nikic@php.net
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 this bug report at https://bugs.php.net/bug.php?id=80782&edit=1
Thread (2 messages)