php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31765 PHP crashes when executing certain code
Submitted: 2005-01-30 18:42 UTC Modified: 2005-02-07 16:07 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: zizka at seznam dot cz Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.10 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: zizka at seznam dot cz
New email:
PHP Version: OS:

 

 [2005-01-30 18:42 UTC] zizka at seznam dot cz
Description:
------------
PHP crashes on my code.

Reproduced on:
Windows 2000 / Apache 1.3.29 / PHP 4.3.6 (Apache mod)
Windows 2000 / Apache 1.3.29 / PHP 4.3.10 (Apache mod)
Windows 2000 / Apache 2.0.52 / PHP 4.3.10 (Apache mod)
Linux hercules 2.4.25 / Apache 1.3.33 / PHP 4.3.10 (Apache mod)
Windows NT 5.2 / Microsoft-IIS 6.0 / PHP Version 4.3.1 (CGI)

Windows 2000's report (transl. from Czech):
Event type:	Chyba
Event source:	Service Control Manager
Kategorie ud?losti:	Nen? k dispozici
Event ID:	7024
Date:		29.1.2005
Time:		14:44:00
User:		N/A
Computer:	WDN
Description:
Service Apache2 was terminated with specific error 1. 

I have reduced the code into two files, but I'm sorry I have no time to create minimal test case. One file is a lib with 450 lines, second just creates the object and calls the methods.
The bug appears when I do certain wild operations with tree made of arrays of objects.
I know which block of code to comment out to get it work.
Also I have found the line where it crashes, although it tells nothing (to me):
   if($oTreeSub->sTag == 'text'){

Reproduce code:
---------------
I can not put the files here publicly because of security reasons, but I can send them to someone who will shorten it to the bug's core and put it here.

Please contact me at
ondra x dynawest. cz
zizka x seznam. cz
http://ondra.zizka.cz

Expected result:
----------------
Not to crash :)

Actual result:
--------------
Crashes.

And at last, I would like to bring attention to my feat.req. -> http://bugs.php.net/bug.php?id=30228 . The answer is insufficient, I would really like to know the reason why PHP4 cant run along with PHP5 on a single apache, or, more specifically, why PHP team does not want it to. Please put there some link to that "forums", thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-31 14:19 UTC] ondra at dynawest dot cz
Don't use zizka at seznam. cz - it doesn't work properly... Use ondra ta dynawest. cz
 [2005-01-31 19:36 UTC] iliaa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

Please supply a SHORT 10-20 line script that can be used to replicate the problem.
 [2005-02-06 17:31 UTC] zizka at seznam dot cz
Here is the code reduced to 30 lines. It still crashes PHP module, but I haven't tested it on other platforms. But I suppose the nature of the bug is the same so it would crash everywhere again.

http://paste.phpfi.com/49791
 [2005-02-06 22:40 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Your code ends up executing an recusrsive function (method) call, which smashes the stack. This is a know behaviour/issue, avoid recursive function/method calls with over 100-200 recursion levels.

 [2005-02-07 16:07 UTC] zizka at seznam dot cz
I see. Thanks for explanation. I thought that PHP handles this gracefully.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC