Public bug reported:

Binary package hint: php5-cli

This program displays the error:

<?

printf("%u\n", ((1 << 31) - 1));

printf("%u\n", ((1 << 31) - 2));

printf("%u\n", ((1 << 31) - 3));

?>

On my 32bit machine it gives this output:
2147483648
2147483648
2147483648

and on my 64 bit this, same on my friends 32bit windows installaton:
2147483647
2147483646
2147483645

shifting a 1 31 steps shouldn't even overflow a 32bit variable, so there
is something wrong here.

** Affects: php5 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
number handling in php broken on 32bit system
https://bugs.launchpad.net/bugs/184747
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to