php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61011
Patch bug61011.phpt revision 2012-02-11 03:14 UTC by laruence@php.net
revision 2012-02-08 16:05 UTC by laruence@php.net
Patch bug61011.patch revision 2012-02-11 03:13 UTC by laruence@php.net
revision 2012-02-08 16:05 UTC by laruence@php.net

Patch bug61011.phpt for Reproducible crash Bug #61011

Patch version 2012-02-11 03:14 UTC

Return to Bug #61011 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: laruence@php.net

--TEST--
Bug #61011 (Crash when an exception is thrown by __autoload accessing a static property)
--FILE--
<?php
function __autoload($name) {
	throw new Exception($name);
}
try { 
	echo AAA::$a; //zend_fetch_var_address_helper
} catch (Exception $e) {
	try {
		echo AAA::XXX; //ZEND_FETCH_CONSTANT
	} catch (Exception $e) {
		try {
			echo AAA::foo(); //ZEND_INIT_STATIC_METHOD_CALL
		} catch (Exception $e) {
			try  {
				unset(AAA::$a); // ZEND_UNSET_VAR
			} catch (Exception $e){
				try {
					isset(AAAA::$a); // ZEND_ISSET_ISEMPTY_VAR
				} catch (Exception $e) {
					try  {
						$a = array("AAA", "foo"); 
						$a(); //ZEND_INIT_FCALL_BY_NAME
					} catch (Exception $e) {
					}
				}
			}
		}
	}
}
echo 'okey';
--EXPECT--
okey
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 14:01:29 2024 UTC