#38387 [NEW]: Calling set_error_handler from constructor segfaults apache
| From: | trivoallan at clever-age dot com | Date: | Tue, 08 Aug 2006 20:37:03 +0000 |
| Subject: | #38387 [NEW]: Calling set_error_handler from constructor segfaults apache | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-100545@lists.php.net to get a copy of this message | ||
From: trivoallan at clever-age dot com
Operating system: GNU/Linux (ubuntu dapper)
PHP version: 5.1.4
PHP Bug Type: Apache2 related
Bug description: Calling set_error_handler from constructor segfaults apache
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 bug report at http://bugs.php.net/?id=38387&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38387&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38387&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38387&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38387&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38387&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38387&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38387&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38387&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38387&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38387&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38387&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38387&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38387&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38387&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38387&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38387&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38387&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38387&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38387&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38387&r=mysqlcfg