|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34066 recursive array_walk causes Segmentain fault
Submitted: 2005-08-10 12:10 UTC Modified: 2006-09-19 09:08 UTC
From: ondrej at sury dot org Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.0.4 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 + 5 = ?
Subscribe to this entry?

 [2005-08-10 12:10 UTC] ondrej at sury dot org
Paul Slootman reported bug when using array_walk recursively which crashes php 5.0.4 with Segmentation Fault.

In php 4.4.0 it ends with:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 138060825 bytes) in /tmp/bug.php on line 252

Reproduce code:

Expected result:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 138060825 bytes) in /tmp/bug.php on line 252

Actual result:
Segmentation fault

Program received signal SIGSEGV, Segmentation fault.
0x081fc929 in zend_call_function ()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-10 12:17 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-08-18 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".
 [2006-09-19 07:39 UTC] seanius at seanius dot net
i can confirm this is still a problem.  the OP includes a link to a chunk of code you can cut and paste which verifies the problem.
 [2006-09-19 09:08 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Fixed in 4_4, 5_2 and HEAD.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jan 19 17:01:24 2021 UTC