Open petk opened 1 month ago
Well, the problem is
That overflows a signed int on 32bit architectures. So we could cast right there.
However, somebody may claim that (int)2147483648
shouldn't evaluate to int(-2147483648)
, but rather to 2147483647
(at least the error message would make some sense then), and if it would be "fixed" accordingly, generating the VM would no longer properly work. And if some more flags would be added, it wouldn't work anyway.
It might be best to drop support for running zend_vm_gen.php on 32bit architectures in the first place.
Agreed on dropping support for using this script on 32 bit architectures, using those as development environments should be rare.
Description
The following code:
Emits some warnings when executing the Zend/zend_vm_gen.php script during the build (this is output for PHP 8.4, but also 8.3 and 8.2 produces similar warnings):
This removes the warnings, but as this script is 3k lines long all-in-one PHP file, I think it's better someone looks at this if this is correct.
PHP Version
PHP 8.2
Operating System
32-bit *nix (for example Debian or FreeBSD)