php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47980 date Fatal error: Balloc() allocation exceeds list boundary
Submitted: 2009-04-16 04:54 UTC Modified: 2009-07-17 01:00 UTC
Votes:10
Avg. Score:4.9 ± 0.3
Reproduced:10 of 10 (100.0%)
Same Version:5 (50.0%)
Same OS:6 (60.0%)
From: crquan at gmail dot com Assigned: fb-req-jani (profile)
Status: No Feedback Package: Date/time related
PHP Version: 5.2.9 OS: PowerPC Linux Embedded
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: crquan at gmail dot com
New email:
PHP Version: OS:

 

 [2009-04-16 04:54 UTC] crquan at gmail dot com
Description:
------------
I'm not to duplicate bug 42975, I just want to reopen that bug but found I (non developers) don't have that permission?

http://bugs.php.net/bug.php?id=42975

I also met this problem with php-5.2.9

'./configure' '--host=powerpc-linux' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-cli' '--disable-ipv6'
'--disable-all' '--enable-fastcgi'

the index.php file only contains one phpinfo(), and it tells

...

date

Fatal error: Balloc() allocation exceeds list boundary in
/vra/www/index.php on line 1
date/time support 	enabled
"Olson" Timezone Database Version 	2009.1
Timezone Database 	internal



I have also tried the CVS snapshot today, 2009-04-16

  http://snaps.php.net/php5.2-latest.tar.gz
 
it still have the problem, with the phpinfo() output, the date function
still have the fatal error:

PHP Version 5.2.10-dev

System 	Linux canyonlands 2.6.25 #2 Mon Apr 13 11:16:43 CST 2009 ppc
Build Date 	Apr 16 2009 12:16:06
Configure Command 	'./configure' '--host=powerpc-linux' '--prefix=/usr'
'--with-config-file-path=/etc' '--disable-cli' '--disable-ipv6'
'--disable-all' '--enable-fastcgi'
Server API 	CGI/FastCGI
Virtual Directory Support 	disabled 

date

Fatal error: Balloc() allocation exceeds list boundary in
/root/index.php on line 1
date/time support 	enabled
"Olson" Timezone Database Version 	2009.6
Timezone Database 	internal



Reproduce code:
---------------
compile php-5.2.9 or the cvs-snapshot tarball, on powerpc platform, get the php-cgi and combined it with lighttp, write a phpinfo() test page,

the date will run with fatal error.

Actual result:
--------------
date

Fatal error: Balloc() allocation exceeds list boundary in /root/index.php on line 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-16 04:59 UTC] crquan at gmail dot com
that's really a fatal error on powerpc linux, please help to fix it, if you don't have that hardware, I can also help to fix it, I have greped the problem source is in Zend/zend_strtod.c, please give some hints on how to resolve,

Zend/zend_strtod.c:

$ grep -RsInw Balloc Zend/
Zend/zend_strtod.c:470:static Bigint * Balloc(int k)
Zend/zend_strtod.c:476:		zend_error(E_ERROR, "Balloc() allocation exceeds list boundary");
Zend/zend_strtod.c:487:			zend_error(E_ERROR, "Balloc() failed to allocate memory");
Zend/zend_strtod.c:522:	r = (int*)Balloc(k);
Zend/zend_strtod.c:570:			b1 = Balloc(b->k+1);
Zend/zend_strtod.c:658:	b = Balloc(1);
Zend/zend_strtod.c:686:	c = Balloc(k);
Zend/zend_strtod.c:757:	b = Balloc(k);
Zend/zend_strtod.c:761:	b = Balloc(k+1);
Zend/zend_strtod.c:839:	b1 = Balloc(k1);
Zend/zend_strtod.c:922:		c = Balloc(0);
Zend/zend_strtod.c:935:	c = Balloc(a->k);
Zend/zend_strtod.c:1110:	b = Balloc(1);
Zend/zend_strtod.c:1112:	b = Balloc(2);
Zend/zend_strtod.c:1917:			mhi = Balloc(mhi->k);
Zend/zend_strtod.c:2310:		bd = Balloc(bd0->k);
 [2009-04-28 05:43 UTC] crquan at gmail dot com
Today I noticed something maybe important:

if I delete /etc/localtime, or use a UTC timezone in /etc/localtime,

the phpinfo() function would display the default timezone is UTC,

Default timezone 	UTC

and no errors,

my previous timezone in using is copied from /usr/share/zoneinfo/Asia/Hong_Kong, maybe this cause the bug?
 [2009-06-24 08:05 UTC] crquan at gmail dot com
I have checked compiled php-5.2.10 for powerpc-linux cross compilation, the result is the bug still exists,

date() function is still broken through php-5.2.9 to 5.2.10, OS is powerpc-linux embedded system.
 [2009-07-09 20:51 UTC] jani@php.net
Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/


 [2009-07-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-07-28 12:02 UTC] s dot aditya at teles dot com
Reproduced on NBSD PPC embedded with PHP 5.3.1. Any suggestions on how to fix?
 [2009-08-20 08:19 UTC] crquan at gmail dot com
---------- Forwarded message ----------  
From: hank peng <pengxihan@gmail.com>
Date: 2009/7/16
Subject: php库的问题我这边已经解决了,你试一下啊?
To: Cheng Renquan <crquan@gmail.com>

在编译的时候加入一个变量即:
#ac_cv_c_bigendian_php=yes ./configure --enable-embed=shared
--with-apxs=/usr/local/apache/bin/apxs
你试试看啊!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC