php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44912 Can not output float data correctly on PowerPC
Submitted: 2008-05-05 06:43 UTC Modified: 2017-09-11 15:14 UTC
Votes:10
Avg. Score:4.7 ± 0.6
Reproduced:8 of 10 (80.0%)
Same Version:6 (75.0%)
Same OS:6 (75.0%)
From: zhy_cqit at 163 dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.2.6 OS: Linux Kernel 2.6.20
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: zhy_cqit at 163 dot com
New email:
PHP Version: OS:

 

 [2008-05-05 06:43 UTC] zhy_cqit at 163 dot com
Description:
------------
The PHP5 has been cross compiled and let it running on the PowerPC.  While executing a division and the result is a float data, it will output a wrong number or crashed!

Reproduce code:
---------------
<?php

   $percent = 5/2;

   echo $percent;

?>


Expected result:
----------------
2.5

Actual result:
--------------
PHP Fatal error:  Balloc() allocation exceeds list boundary in /mnt/apache2/htdocs/test.php on line 3

Fatal error: Balloc() allocation exceeds list boundary in /mnt/apache2/htdocs/test.php on line 3


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-08 18:23 UTC] julia dot keffer at pikatech dot com
I had the same problem with version 5.2.5 when trying to cross compile for the PowerPC. The comments in these two bug reports gave me a solution:

http://bugs.php.net/bug.php?id=41951
- I changed the values of the variables mentioned to 4
http://bugs.php.net/bug.php?id=45148
- I forced ac_cv_c_bigendian_php=yes as suggested
 [2008-08-10 21:47 UTC] jani@php.net
And like I said in the other reports: cross-compiling is not supported out-of-box.
 [2017-09-11 15:14 UTC] cmb@php.net
-Package: BC math related +Package: Scripting Engine problem
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 12:01:28 2024 UTC