httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36346] - server-status prints some large integers as negative numbers
Date Thu, 01 Sep 2005 17:17:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36346>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36346





------- Additional Comments From jps-dilbert@savagebeast.com  2005-09-01 19:16 -------
What we are observing here is 31-bit overflow, not 32-bit overflow.  Yes, 32-bot overflow
will come 
later.  But this bug makes it twice as likely to be wrong.

Casting a signed int to an unsigned int doesn't do anything to the underlying bits.  It just
tells the 
compiler that some operations aren't possible:  if ((unsigned int) x < 0), for example.
 But nothing 
changes at run-time.

The bug is in the formatting code.   Somebody probably called sprintf with %d instead of %u.
 That's a 
very common mistake.  

The fact that a '-' sign shows up is completely a bug in the function that formats the value
for printing.  
Somebody thought that counts should be treated as signed; they're not.  It's a formatting
thing.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message