php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40515 segmentation fault
Submitted: 2007-02-17 10:46 UTC Modified: 2007-02-17 11:23 UTC
From: lamak at lamak dot ru Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.1 OS: Linux Ubuntu 2.6.17-10-server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lamak at lamak dot ru
New email:
PHP Version: OS:

 

 [2007-02-17 10:46 UTC] lamak at lamak dot ru
Description:
------------
<?
class Log
{
        public static function eh($e)
        {
        }
}
set_exception_handler("Log::eh");
throw new Exception('boom!');
?>






Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-17 11:15 UTC] mike@php.net
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

Cannot reproduce:

Warning: set_exception_handler() expects the argument (c::f) to be a valid callback in Command line code on line 1

Fatal error: Uncaught exception 'Exception' with message 'foo' in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1

 [2007-02-17 11:23 UTC] lamak at lamak dot ru
to mike@php.net

Thank you! I'm an idiot :) I solved this with

<?
class Log
{
        public static function eh($e)
        {
        }
}

function myCallbackReplacementForHandler($e)
{
 Log::eh($e)
}
set_exception_handler("myCallbackReplacementForHandler");
throw new Exception('boom!');
?>

now it works correctly. thanks once more for quick answer.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 02 06:00:03 2025 UTC