- Session:
. Fixed bug #71122 (Session GC may not remove obsolete session data). (Yasuo)
+- SPL:
+ . Fixed bug #71204 (segfault if clean spl_autoload_funcs while autoloading).
+ (Laruence)
+
- Standard:
. Fixed bug #70720 (strip_tags improper php code parsing). (Julien)
if (SPL_G(autoload_functions)) {
if (func_name_len == sizeof("spl_autoload_call")-1 && !strcmp(lc_name, "spl_autoload_call")) {
/* remove all */
- zend_hash_destroy(SPL_G(autoload_functions));
- FREE_HASHTABLE(SPL_G(autoload_functions));
- SPL_G(autoload_functions) = NULL;
- EG(autoload_func) = NULL;
+ if (!SPL_G(autoload_running)) {
+ zend_hash_destroy(SPL_G(autoload_functions));
+ FREE_HASHTABLE(SPL_G(autoload_functions));
+ SPL_G(autoload_functions) = NULL;
+ EG(autoload_func) = NULL;
+ } else {
+ zend_hash_clean(SPL_G(autoload_functions));
+ }
success = SUCCESS;
} else {
/* remove specific */
--- /dev/null
+--TEST--
+Bug #71204 (segfault if clean spl_autoload_funcs while autoloading )
+--FILE--
+<?php
+
+spl_autoload_register(function ($name) {
+ spl_autoload_unregister("spl_autoload_call");
+});
+
+spl_autoload_register(function ($name) {
+});
+
+new A();
+?>
+--EXPECTF--
+Fatal error: Cannot destroy active lambda function in %sbug71204.php on line %d