php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54578 bitwiseNot_basiclong_64bit test fails on ppc64
Submitted: 2011-04-20 19:52 UTC Modified: 2020-01-29 13:06 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: jwboyer at linux dot vnet dot ibm dot com Assigned: ab (profile)
Status: Closed Package: *Math Functions
PHP Version: 5.3.6 OS: Linux
Private report: No CVE-ID: None
 [2011-04-20 19:52 UTC] jwboyer at linux dot vnet dot ibm dot com
Description:
------------
When running the bitwiseNot_basiclong_64bit.phpt test on ppc64, the output 
differs 
in one place from the expected results.  This seems to be a result of MAX_64Bit 
+ 
1 being internally interpreted as a float and some kind of rounding error, 
however I'm not certain that is the case.  The failing test is the third from 
the bottom in the output.

I originally found this in 5.3.2 on RHEL 6, but I built a local 5.3.6 and it 
happens there still as well.

bash-4.1# php --version
PHP 5.3.6 (cli) (built: Apr 20 2011 09:26:51) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
bash-4.1# 


Expected result:
----------------
--EXPECT--
--- testing: 9223372036854775807 ---
int(-9223372036854775808)
--- testing: -9223372036854775808 ---
int(9223372036854775807)
--- testing: 2147483647 ---
int(-2147483648)
--- testing: -2147483648 ---
int(2147483647)
--- testing: 9223372034707292160 ---
int(-9223372034707292161)
--- testing: -9223372034707292160 ---
int(9223372034707292159)
--- testing: 2147483648 ---
int(-2147483649)
--- testing: -2147483649 ---
int(2147483648)
--- testing: 4294967294 ---
int(-4294967295)
--- testing: 4294967295 ---
int(-4294967296)
--- testing: 4294967293 ---
int(-4294967294)
--- testing: 9223372036854775806 ---
int(-9223372036854775807)
--- testing: 9.2233720368548E+18 ---
int(9223372036854775807)
--- testing: -9223372036854775807 ---
int(9223372036854775806)
--- testing: -9.2233720368548E+18 ---
int(9223372036854775807)
===DONE===

Actual result:
--------------
--- testing: 9223372036854775807 ---
int(-9223372036854775808)
--- testing: -9223372036854775808 ---
int(9223372036854775807)
--- testing: 2147483647 ---
int(-2147483648)
--- testing: -2147483648 ---
int(2147483647)
--- testing: 9223372034707292160 ---
int(-9223372034707292161)
--- testing: -9223372034707292160 ---
int(9223372034707292159)
--- testing: 2147483648 ---
int(-2147483649)
--- testing: -2147483649 ---
int(2147483648)
--- testing: 4294967294 ---
int(-4294967295)
--- testing: 4294967295 ---
int(-4294967296)
--- testing: 4294967293 ---
int(-4294967294)
--- testing: 9223372036854775806 ---
int(-9223372036854775807)
--- testing: 9.2233720368548E+18 ---
int(-9223372036854775808)
--- testing: -9223372036854775807 ---
int(9223372036854775806)
--- testing: -9.2233720368548E+18 ---
int(9223372036854775807)
===DONE===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-29 13:06 UTC] ab@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2020-01-29 13:06 UTC] ab@php.net
Doesn't repro anymore with at least PHp 7.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 11 16:01:30 2024 UTC