php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30509 Infinite recursion in Engine
Submitted: 2004-10-21 06:22 UTC Modified: 2004-10-21 15:59 UTC
From: azmoo at azmoo dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.2 OS: Linux, Fedora Core 1 and 2
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: azmoo at azmoo dot net
New email:
PHP Version: OS:

 

 [2004-10-21 06:22 UTC] azmoo at azmoo dot net
Description:
------------
When running the provided code, the second time that the recursive function, recurseQueries() is called, it seems to send the Zend Engine into infinite recursion. Apache, both versions 1.3 and version 2, then Segfaults. Error log from apache is as follows:

[Thu Oct 21 13:34:26 2004] [notice] child pid 18344 exit signal Segmentation fault (11)

This happens on PHP versions 5.01 and 5.02.

Reproduce code:
---------------
http://www.azmoo.net/work/SQLParser.inc.phps

Expected result:
----------------
Should have a DOMDocument object with data in a heirarchical format. Apache should not crash.

Actual result:
--------------
Segfault.

Backtrace located at http://www.azmoo.net/work/sql_backtrace.txt

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-21 09:20 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is a bug in your code.
 [2004-10-21 15:59 UTC] azmoo at azmoo dot net
This is not a bug in my code. It enters the recursive function once before segfaulting and the backtrace indicates a bug in the Zend Engine. We have tested this by outputting to a file each time the recursive function is called, and it is only outputting once. Try it yourself, the provided source will demonstrate the problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 19:01:30 2024 UTC