php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44632 Segmentation fault when methods are playing "ping-pong"
Submitted: 2008-04-03 18:31 UTC Modified: 2008-04-03 21:00 UTC
From: thh at tshw dot de Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.5 OS: Linux (Scientific & Ubuntu)
Private report: No CVE-ID: None
 [2008-04-03 18:31 UTC] thh at tshw dot de
Description:
------------
Today we had an annoying issue with a complex class model, of which two classes happened to call each others method in a never ending loop. The result was a "Segmentation fault" providing no further information about the source of the error. PHP probably should handle those (programming) errors itself providing a more detailed error message.

I could reproduce this error on a Scientific Linux with PHP 5.1.2 (cgi) as well as PHP 5.2.5 (cgi) and on Ubuntu Linux with PHP 5.2.3 (cli).

Reproduce code:
---------------
http://nopaste.tshw.de/1207246418545df/

Expected result:
----------------
Actually it really is a programmer's error. But it was really hard to identify because of the annoyingly short message "Segmentation fault". It would even have helped to get a "call stack overflow" instead.

Actual result:
--------------
Segmentation fault
(I did not append a backtrace, because I think the problem is very obvious and I'd hate to compile PHP on a binary-based distribution. If you need it, tell me and I'll try to get you one.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-03 21:00 UTC] jani@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


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 20:00:02 2025 UTC