#47980 [Com]: date Fatal error: Balloc() allocation exceeds list boundary

From: Date: Thu, 16 Apr 2009 04:59:08 +0000
Subject: #47980 [Com]: date Fatal error: Balloc() allocation exceeds list boundary
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135862@lists.php.net to get a copy of this message
 ID:               47980
 Comment by:       crquan at gmail dot com
 Reported By:      crquan at gmail dot com
 Status:           Open
 Bug Type:         Date/time related
 Operating System: PowerPC Linux Embedded
 PHP Version:      5.2.9
 New Comment:

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);


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

[2009-04-16 04:54:36] 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


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


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



Thread (8 messages)

« previous php.bugs (#135862) next »