|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40815 Trying apply default exception handler produces segfault
Submitted: 2007-03-15 10:42 UTC Modified: 2007-03-15 16:44 UTC
From: nizar dot jouini at gmail dot com Assigned: tony2001 (profile)
Status: Closed Package: Reproducible crash
PHP Version: 5.2.1 OS: Linux 2.6.17-10/Ubuntu 6.10
Private report: No CVE-ID: None
 [2007-03-15 10:42 UTC] nizar dot jouini at gmail dot com
Trying to set an exception handler which is a type of 'static public function' results in a segfault. This script is run from php-cli

Reproduce code:

class ehandle{
        static public function exh ($ex) {

                echo 'foo';


throw new Exception ("Whiii");


Expected result:
I would expect to catch an exception.

Actual result:
fish: Job 1, ?php destroythis.php ? terminated by signal SIGSEGV (Address boundary error)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-15 10:48 UTC] nizar dot jouini at gmail dot com
It seems that it is also possible to produce this in RHEL4/Centos4 (PHP 5.2.1 compiled from sources) with the same result.
 [2007-03-15 16:44 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 18:01:25 2019 UTC