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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 10:01:32 2024 UTC