#46579 [Opn->Fbk]: % integer overflow - no error message
| From: | jani@php.net | Date: | Mon, 17 Nov 2008 09:50:42 +0000 |
| Subject: | #46579 [Opn->Fbk]: % integer overflow - no error message | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-131021@lists.php.net to get a copy of this message | ||
ID: 46579
Updated by: jani@php.net
Reported By: grissom dot bulldog at btinternet dot com
-Status: Open
+Status: Feedback
Bug Type: Math related
Operating System: Windows
PHP Version: 5.2.6
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2008-11-15 16:41:02] grissom dot bulldog at btinternet dot com
Description:
------------
To add my 2 cents to the (looks like ongoing) issue of the % operator
returning negative values when there is an integer overflow (ie where it
is greater than 2^31-1)
I'm not happy with the way the explanation is hand-waved away by
previous replies saying "it's not a bug, it's an integer overflow".
And I am aware there are other functions and ways round the problem,
but that does not escape the fact that the function returns an erroneous
value to the unsuspecting programmer who has not considered integer
overflow.
I would want that in such an instance, instead of returning a negative
value and carrying on as if everything were perfectly alright, PHP
should return an error message, something like "Integer Overflow at line
100".
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46579&edit=1