php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64821 Custom Exceptions crash when internal properties overridden
Submitted: 2013-05-12 11:39 UTC Modified: 2013-05-12 12:13 UTC
From: ab@php.net Assigned: ab
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS: Windows x64
Private report: No CVE-ID:
 [2013-05-12 11:39 UTC] ab@php.net
Description:
------------
This bug is related to bug #50005, so the snippet from Zend/tests/bug50005.phpt 
. The BT below

>	msvcr110d.dll!_strdup_dbg(const char * string, int nBlockUse, const char 
* szFileName, int nLine) Line 73	C
 	php5_debug.dll!php_error_cb(int type, const char * error_filename, const 
unsigned int error_lineno, const char * format, char * args) Line 983	C
 	php5_debug.dll!zend_error_va(int type, const char * file, unsigned int 
lineno, const char * format, ...) Line 792	C
 	php5_debug.dll!zend_exception_error(_zval_struct * exception, int 
severity) Line 832	C
 	php5_debug.dll!zend_execute_scripts(int type, _zval_struct * * retval, 
int file_count, ...) Line 1343	C
 	php5_debug.dll!php_execute_script(_zend_file_handle * primary_file) Line 
2479	C
 	php.exe!do_cli(int argc, char * * argv) Line 994	C


Test script:
---------------
<?php

class a extends exception {
        public function __construct() {
                $this->file = null;
        }
}

throw new a;

Expected result:
----------------
no crash

Actual result:
--------------
crash

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-05-12 11:44 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2013-05-12 12:11 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d6505acbf5ff6db0e9e19cdba121183d9563bad5
Log: Fixed bug #64821 Custom Exceptions crash when internal properties overridden
 [2013-05-12 12:11 UTC] ab@php.net
-Status: Assigned +Status: Closed
 [2013-05-12 12:13 UTC] ab@php.net
related to bug #50005
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 07:02:02 2014 UTC