php.net |  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
Description:
------------
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:
---------------
<?php

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

                echo 'foo';
        }
}


set_exception_handler("ehandle::exh");

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)

Patches

Pull Requests

History

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] tony2001@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC