#36188 [Opn->Fbk]: faulty user error handler code can cause segfault

From: Date: Mon, 30 Jan 2006 09:11:47 +0000
Subject: #36188 [Opn->Fbk]: faulty user error handler code can cause segfault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92618@lists.php.net to get a copy of this message
ID: 36188 Updated by: tony2001@php.net Reported By: jsjohnst@php.net -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: FreeBSD 4.x PHP Version: 5.1.2 New Comment: Can't see any segfaults with this code. Provide a real reproduce code that actually demonstrates the problem, not the part of it. Previous Comments: ------------------------------------------------------------------------ [2006-01-28 06:51:19] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36188&edit=1

« previous php.bugs (#92618) next »