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 (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS: Windows x64
Private report: No CVE-ID: None
 [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

Pull Requests

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
 [2014-10-07 23:19 UTC] stas@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=d6505acbf5ff6db0e9e19cdba121183d9563bad5
Log: Fixed bug #64821 Custom Exceptions crash when internal properties overridden
 [2014-10-07 23:30 UTC] stas@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=d6505acbf5ff6db0e9e19cdba121183d9563bad5
Log: Fixed bug #64821 Custom Exceptions crash when internal properties overridden
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC