php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36188 faulty user error handler code can cause segfault
Submitted: 2006-01-28 06:51 UTC Modified: 2006-02-07 01:00 UTC
From: jsjohnst@php.net Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.1.2 OS: FreeBSD 4.x
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jsjohnst@php.net
New email:
PHP Version: OS:

 

 [2006-01-28 06:51 UTC] jsjohnst@php.net
Description:
------------
With a poorly written custom PHP error handler it's possible to segfault PHP. Of course fixing the code prevents the sefault, but userland code shouldn't segfault PHP.


P.S. - I realize xdebug and APC are both running, but I was told to file the bug report by Rasmus so I am.

Reproduce code:
---------------
Version #1:
http://www.jeremyjohnstone.com/code/bugs.php.net/segfault_error_handler.phps

Version #2 (slightly different reason+crash location, but also segfaults):
http://www.jeremyjohnstone.com/code/bugs.php.net/segfault_error_handler2.phps

Expected result:
----------------
Well, the above code is bad, so one would expect something bad to happen, just not a segfault of PHP because of faulty userland code.

Actual result:
--------------
Backtrace for code sample #1:
http://www.jeremyjohnstone.com/code/bugs.php.net/backtrace.txt

Backtrace for code sample #2:
http://www.jeremyjohnstone.com/code/bugs.php.net/backtrace2.txt

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-30 10:11 UTC] tony2001@php.net
Can't see any segfaults with this code.
Provide a real reproduce code that actually demonstrates the problem, not the part of it.
 [2006-02-07 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".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 14:01:31 2025 UTC