php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30998 Crash when user error handler returns false
Submitted: 2004-12-06 16:40 UTC Modified: 2004-12-06 16:50 UTC
From: stas@php.net Assigned:
Status: Closed Package: Reproducible crash
PHP Version: any OS: Linux/amd64
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: stas@php.net
New email:
PHP Version: OS:

 

 [2004-12-06 16:40 UTC] stas@php.net
Description:
------------
If user error handler returns false on amd64, PHP crashes. This is due to the fact that zend_error uses va_list twice, which does not work on systems where va_arg modifies va_list. 

Reproduce code:
---------------
<?
                                                                                                    
function my_error($errno, $errstr, $errfile, $errline)
{
        print "$errstr ($errno) in $errfile:$errline\n";
        return false;
}
                                                                                                    
set_error_handler('my_error');
                                                                                                    
$f = fopen("/tmp/blah", "r");
?>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-06 16:50 UTC] stas@php.net
Affects both PHP4 and PHP5, fixed in both. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 23:01:29 2024 UTC