php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14738 array_pad dies with large pad length
Submitted: 2001-12-28 11:13 UTC Modified: 2002-09-25 17:17 UTC
From: brianm at dealnews dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.0-dev OS: Linux
Private report: No CVE-ID: None
 [2001-12-28 11:13 UTC] brianm at dealnews dot com
This code:

$arr=array();
$arr=array_pad($arr, 65535, md5(microtime()));

causes this output:

[Fri Dec 28 10:01:38 2001]  Script:  './test.php'
---------------------------------------
zend_execute.h(62) : Block 0x081BD070 status:
Beginning:      Cached (allocated on ./zend_execute.c:1502, 12 bytes)
      End:      OK
---------------------------------------

backing that down to 65534 will cause no error.  Looks like that parameter is set to only allow 32 bit integers. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-26 21:49 UTC] yohgaki@php.net
Try snapshot. http://snaps.php.net/
I don't see the error. If you have problem, please reopen.
 [2002-02-26 23:16 UTC] brianm at dealnews dot com
Sorry, that should have been anything larger than 65535 will cause this.  Try like 80000.
 [2002-02-27 01:06 UTC] yohgaki@php.net
With "80000" or "65536", I get the output.

Script:  '-'
---------------------------------------
zend_execute.h(62) : Block 0x082FC410 status:
Beginning:      Cached (allocated on ./zend_execute.c:1596, 12 bytes)
      End:      OK
---------------------------------------


 [2002-06-18 07:03 UTC] mfischer@php.net
Please try the latest snapshot from http://snaps.php.net/php4-latest.tar.gz , I'm pretty sure this has been fixed already, I can't reproduce it myself.
 [2002-07-19 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, 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".
 [2002-07-29 09:08 UTC] nohn@php.net
Could not verify this with 4.3.0-dev on Compaq Tru64 / Alpha
 [2002-08-19 15:02 UTC] nohn@php.net
Verfied this on Linux/x86.

May be similar to http://bugs.php.net/bug.php?id=18743 and some array someone (Dan) closed today regarded to some int-value in Zend engine (don't remember anything more on this)
 [2002-08-19 15:59 UTC] kalowsky@php.net
Just for the record, I haven't closed any array bugs today, nor yesterday if I remember correctly :)
 [2002-08-21 09:55 UTC] edink@php.net
FYI: cannot reproduce with a fresh CVS version on Linux (RedHat 6.2).
 [2002-08-21 11:21 UTC] nohn@php.net
Could not verify on SuSE 8.0/x86/Apache 1.3.26/PHP 4.2.3-dev
Could not verify on SuSE 8.0/x86/Apache 1.3.26/PHP 4.3.0-dev
Could not verify on SuSE 8.0/x86/CLI/PHP 4.3.0-dev

Could verify on Solaris 7/Sparc/CLI/PHP 4.3.0-dev (die)
Could verify on Solaris 7/Sparc/CLI/PHP 4.2.3-dev (die)
Could verify on Solaris 7/Sparc/CLI/PHP 4.1.1 (bus error)
Could verify on Solaris 7/Sparc/CLI/PHP 4.0.6 (bus error)


 [2002-09-25 15:17 UTC] jason@php.net
Could not verify - Solaris 8 / Sparc

-jason
 [2002-09-25 17:17 UTC] sniper@php.net
Fixed in CVS then.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 14:01:28 2025 UTC