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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 + 50 = ?
Subscribe to this entry?

 
 [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
 [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 Apr 23 13:01:29 2024 UTC