#38387 [Opn->Fbk]: Calling set_error_handler from constructor segfaults apache
| From: | tony2001@php.net | Date: | Tue, 08 Aug 2006 21:04:11 +0000 |
| Subject: | #38387 [Opn->Fbk]: Calling set_error_handler from constructor segfaults apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100547@lists.php.net to get a copy of this message | ||
ID: 38387
Updated by: tony2001@php.net
Reported By: trivoallan at clever-age dot com
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: GNU/Linux (ubuntu dapper)
PHP Version: 5.1.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Can't reproduce.
Previous Comments:
------------------------------------------------------------------------
[2006-08-08 20:48:52] judas dot iscariote at gmail dot com
what code your handleError method have ?
works perfectly fine in current 5_2 CVS... provide complete code please
;-)
------------------------------------------------------------------------
[2006-08-08 20:37:03] trivoallan at clever-age dot com
Description:
------------
Apache version : 2.0.55
Calling set_error_handler from a class constructor makes apache crash.
Calling the function from other methods works without problems.
I've run accross #24708, and the problem does not come from there.
Reproduce code:
---------------
class cbJob
{
public function __construct($id_ressource = null, $action_name =
null)
{
set_error_handler(array($this, 'handleError'));
}
public function __destruct()
{
restore_error_handler();
}
}
Expected result:
----------------
Error handler is cbJob::handleError()
Actual result:
--------------
[Tue Aug 08 22:09:49 2006] [notice] child pid 6876 exit signal
Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38387&edit=1