felipe Tue, 07 Jun 2011 22:58:38 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311903
Log: - Fixed bug #55007 (compiler fail after previous fail) Bug: http://bugs.php.net/55007 (Closed) compiler fail after previous fail Changed paths: U php/php-src/branches/PHP_5_3/NEWS A php/php-src/branches/PHP_5_3/Zend/tests/bug55007.phpt U php/php-src/branches/PHP_5_3/Zend/zend.c A php/php-src/branches/PHP_5_4/Zend/tests/bug55007.phpt U php/php-src/branches/PHP_5_4/Zend/zend.c A php/php-src/trunk/Zend/tests/bug55007.phpt U php/php-src/trunk/Zend/zend.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2011-06-07 22:22:01 UTC (rev 311902) +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-07 22:58:38 UTC (rev 311903) @@ -6,6 +6,7 @@ - Increased the backtrack limit from 100000 to 1000000 (Rasmus) - Zend Engine: + . Fixed bug #55007 (compiler fail after previous fail). (Felipe) . Fixed bug #54910 (Crash when calling call_user_func with unknown function name). (Dmitry) . Fixed bug #54804 (__halt_compiler and imported namespaces). Added: php/php-src/branches/PHP_5_3/Zend/tests/bug55007.phpt =================================================================== --- php/php-src/branches/PHP_5_3/Zend/tests/bug55007.phpt (rev 0) +++ php/php-src/branches/PHP_5_3/Zend/tests/bug55007.phpt 2011-06-07 22:58:38 UTC (rev 311903) @@ -0,0 +1,23 @@ +--TEST-- +Bug #55007 (compiler fail after previous fail) +--FILE-- +<?php + +function __autoload($classname) { + if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[] } }'); + if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }'); +} + +function shutdown() { + new MyErrorHandler(); +} + + +register_shutdown_function('shutdown'); + +new CompileErrorClass(); + +?> +--EXPECTF-- +Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d +My error handler runs. Modified: php/php-src/branches/PHP_5_3/Zend/zend.c =================================================================== --- php/php-src/branches/PHP_5_3/Zend/zend.c 2011-06-07 22:22:01 UTC (rev 311902) +++ php/php-src/branches/PHP_5_3/Zend/zend.c 2011-06-07 22:58:38 UTC (rev 311903) @@ -808,6 +808,7 @@ exit(-1); } CG(unclean_shutdown) = 1; + CG(active_class_entry) = NULL; CG(in_compilation) = EG(in_execution) = 0; EG(current_execute_data) = NULL; LONGJMP(*EG(bailout), FAILURE); Added: php/php-src/branches/PHP_5_4/Zend/tests/bug55007.phpt =================================================================== --- php/php-src/branches/PHP_5_4/Zend/tests/bug55007.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/bug55007.phpt 2011-06-07 22:58:38 UTC (rev 311903) @@ -0,0 +1,23 @@ +--TEST-- +Bug #55007 (compiler fail after previous fail) +--FILE-- +<?php + +function __autoload($classname) { + if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[] } }'); + if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }'); +} + +function shutdown() { + new MyErrorHandler(); +} + + +register_shutdown_function('shutdown'); + +new CompileErrorClass(); + +?> +--EXPECTF-- +Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d +My error handler runs. Modified: php/php-src/branches/PHP_5_4/Zend/zend.c =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend.c 2011-06-07 22:22:01 UTC (rev 311902) +++ php/php-src/branches/PHP_5_4/Zend/zend.c 2011-06-07 22:58:38 UTC (rev 311903) @@ -849,6 +849,7 @@ exit(-1); } CG(unclean_shutdown) = 1; + CG(active_class_entry) = NULL; CG(in_compilation) = EG(in_execution) = 0; EG(current_execute_data) = NULL; LONGJMP(*EG(bailout), FAILURE); Added: php/php-src/trunk/Zend/tests/bug55007.phpt =================================================================== --- php/php-src/trunk/Zend/tests/bug55007.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug55007.phpt 2011-06-07 22:58:38 UTC (rev 311903) @@ -0,0 +1,23 @@ +--TEST-- +Bug #55007 (compiler fail after previous fail) +--FILE-- +<?php + +function __autoload($classname) { + if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[] } }'); + if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }'); +} + +function shutdown() { + new MyErrorHandler(); +} + + +register_shutdown_function('shutdown'); + +new CompileErrorClass(); + +?> +--EXPECTF-- +Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d +My error handler runs. Modified: php/php-src/trunk/Zend/zend.c =================================================================== --- php/php-src/trunk/Zend/zend.c 2011-06-07 22:22:01 UTC (rev 311902) +++ php/php-src/trunk/Zend/zend.c 2011-06-07 22:58:38 UTC (rev 311903) @@ -857,6 +857,7 @@ exit(-1); } CG(unclean_shutdown) = 1; + CG(active_class_entry) = NULL; CG(in_compilation) = EG(in_execution) = 0; EG(current_execute_data) = NULL; LONGJMP(*EG(bailout), FAILURE);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php