?? Jan 2016 PHP 7.0.2
- Core:
+ . Fixed bug #71163 (Segmentation Fault: cleanup_unfinished_calls). (Laruence)
. Fixed bug #71109 (ZEND_MOD_CONFLICTS("xdebug") doesn't work). (Laruence)
. Fixed bug #71105 (Format String Vulnerability in Class Name Error Message).
(andrew at jmpesp dot org)
--- /dev/null
+--TEST--
+Bug #71163 (Segmentation Fault (cleanup_unfinished_calls))
+--FILE--
+<?php
+function __autoload($name) {
+ eval ("class $name extends Exception { public static function foo() {}}");
+ throw new Exception("boom");
+}
+
+function test2() {
+ try {
+ Test::foo();
+ } catch (Exception $e) {
+ echo "okey";
+ }
+}
+
+function test() {
+ test2();
+}
+
+test();
+?>
+--EXPECT--
+okey
zend_class_entry *ce = NULL;
zval args[1];
zval local_retval;
- int retval;
zend_string *lc_name;
zend_fcall_info fcall_info;
zend_fcall_info_cache fcall_cache;
fcall_cache.object = NULL;
zend_exception_save();
- retval = zend_call_function(&fcall_info, &fcall_cache);
+ if ((zend_call_function(&fcall_info, &fcall_cache) == SUCCESS) && !EG(exception)) {
+ ce = zend_hash_find_ptr(EG(class_table), lc_name);
+ }
zend_exception_restore();
zval_ptr_dtor(&args[0]);
zval_ptr_dtor(&local_retval);
- if (retval == SUCCESS) {
- ce = zend_hash_find_ptr(EG(class_table), lc_name);
- }
if (!key) {
zend_string_release(lc_name);
}