ID:               40543
 Comment by:       petr dot stastny at centrum dot cz
 Reported By:      dedmajor at gmail dot com
 Status:           Feedback
 Bug Type:         Strings related
 Operating System: linux x86_64
 PHP Version:      5.2.1
 New Comment:

All right! I just compiled the newest snapshot and it seems to be
fixed. Thanks.


Previous Comments:
------------------------------------------------------------------------

[2007-04-23 18:03:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



------------------------------------------------------------------------

[2007-04-23 17:19:13] petr dot stastny at centrum dot cz

Okay, I will say exactly where I have this problem:

PHP 5.2.1

# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 67
model name      : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+


# uname -a
Linux silver 2.6.18-8.1.1.el5 #1 SMP Mon Apr 9 09:43:24 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux


php -r 'print_r(unpack("N", pack("N", 41445)));

returns the same as metioned int the original message about this bug:
-2147442203

If you use sprintf('%b',....), you can see:
1111111111111111111111111111111110000000000000001010000111100101

First 32 bits are set to 1.

There is no problem on Intel Xeon 64-bit processor as I could test.

------------------------------------------------------------------------

[2007-04-23 09:18:20] [EMAIL PROTECTED]

Not reproducible (both on 32bit and 64bit).

------------------------------------------------------------------------

[2007-04-22 18:44:55] petr dot stastny at centrum dot cz

Sorry, it is converted to SIGNED int

------------------------------------------------------------------------

[2007-04-22 18:43:53] petr dot stastny at centrum dot cz

The problem is that first 32 bits are set to 1 (not 0) in the output of
unpack() function, thus it is interpreted as very large number and then
converted to unsigned int for PHP representation.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/40543

-- 
Edit this bug report at http://bugs.php.net/?id=40543&edit=1

Reply via email to