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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 09:01:34 2025 UTC