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
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: 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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 23:01:32 2024 UTC