You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/php-src/Zend/zend_strtod.c:3617:5: runtime error: left shift of 1073741824 by 1 places cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/zend_strtod.c:3617:5
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered:
When allocating enough room for floats, the allocator used by overflows with
large ndigits/EG(precision) value which used an signed integer to double
the buffer. Testing with the zend operator directly is enough to trigger
the issue rather than higher level math interface.
devnexen
added a commit
to devnexen/php-src
that referenced
this issue
Sep 2, 2024
When allocating enough room for floats, the allocator used overflows with
large ndigits/EG(precision) value which used an signed integer to
increase the size of thebuffer.
Testing with the zend operator directly is enough to trigger
the issue rather than higher level math interface.
It triggered allocation overflow which, even fixed, in turn gives memory
leak on 32 bits but the allocator relies on signed integers so instead
of changing `j` type we exit if an overflow during the buffer increase
is going to happen.
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: