php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46435 restore_error_handler crash
Submitted: 2008-10-31 15:51 UTC Modified: 2008-10-31 15:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: olivier at ajeux dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.3.0alpha2 OS: Linux
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: olivier at ajeux dot com
New email:
PHP Version: OS:

 

 [2008-10-31 15:51 UTC] olivier at ajeux dot com
Description:
------------
Tested with php5.3-200810301330 (bug happened with previous snapshots).

It seems restore_error_handler is not working and crashed PHP.
See reproduce code below.

Same code working as expected with PHP 5.2.3 (cli)

This bug may be similar to Bug #46196, but PHP also crashed with message "zend_mm_heap corrupted".


Reproduce code:
---------------
<?php

var_dump ( set_error_handler ('myErrorHandler') );
restore_error_handler  ();
var_dump ( set_error_handler ('myErrorHandler') );

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
    return true;
}


Expected result:
----------------
NULL
NULL

Actual result:
--------------
NULL
string(14) "myErrorHandler"
zend_mm_heap corrupted


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-31 15:59 UTC] jani@php.net
Please add your comments to bug #49196 since this is essentially same issue. (most likely the other reportee didn't have error_reporting high enough :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC