Patch suhosin-class-destructor-fix for bcompiler Bug #59912
Patch version 2012-06-25 14:08 UTC
Return to Bug #59912 |
Download this patch
Patch Revisions:
Developer: icukeng@gmail.com
Index: php_bcompiler.c
===================================================================
--- php_bcompiler.c (revision 326295)
+++ php_bcompiler.c (working copy)
@@ -166,6 +166,7 @@
HashTable ht;
zend_hash_init(&ht, 0, NULL, (dtor_func_t)&zend_destroy_property_info, 0);
zend_hash_destroy(&ht);
+ bcompiler_globals->properties_info_destructor = &zend_destroy_property_info;
#endif
bcompiler_globals->stream = NULL;
Index: php_bcompiler.h
===================================================================
--- php_bcompiler.h (revision 326295)
+++ php_bcompiler.h (working copy)
@@ -101,6 +101,9 @@
#endif
int detect_filedir; /* try to detect __FILE__ and __DIR__ (default: true) */
zend_op_array *zoa; /* current zend_op_array */
+#ifdef ZEND_ENGINE_2
+ dtor_func_t properties_info_destructor;
+#endif
ZEND_END_MODULE_GLOBALS(bcompiler)
/* we use globals */
Index: bcompiler_zend.c
===================================================================
--- bcompiler_zend.c (revision 326295)
+++ bcompiler_zend.c (working copy)
@@ -1005,10 +1005,10 @@
}
#ifdef ZEND_ENGINE_2
-static void zend_destroy_property_info(zend_property_info *property_info)
+/*static void zend_destroy_property_info(zend_property_info *property_info)
{
efree(ZS2S(property_info->name));
-}
+}*/
#endif
#ifndef ZEND_ENGINE_2
@@ -1125,7 +1125,8 @@
(void*) apc_free_zend_property_info,
(int) sizeof(zend_property_info) ,
(char) exists TSRMLS_CC);
- zce->properties_info.pDestructor = (dtor_func_t)&zend_destroy_property_info;
+ //zce->properties_info.pDestructor = (dtor_func_t)&zend_destroy_property_info;
+ zce->properties_info.pDestructor = BCOMPILERG(properties_info_destructor);
BCOMPILERG(cur_zc) = NULL;
# ifndef ZEND_ENGINE_2_4 /* todo */
|