com php/gtk-src: Fixes bug #55225 - segfault on cleanup after dl load: main/php_gtk.c
| From: | Elizabeth Marie Smith | Date: | Wed, 18 Jul 2012 19:03:24 +0000 |
| Subject: | com php/gtk-src: Fixes bug #55225 - segfault on cleanup after dl load: main/php_gtk.c | ||
| Groups: | php.gtk.cvs | ||
| Request: | Send a blank email to php-gtk-cvs+get-4865@lists.php.net to get a copy of this message | ||
Commit: 598e23dcaf0669d68d497d7216eefd1bd5963e78
Author: Elizabeth M Smith <auroraeosrose@gmail.com> Wed, 18 Jul 2012 15:03:24 -0400
Parents: ba6ed42850464c6eae51a0d65fb29bf3b976b5ac
Branches: master
Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=598e23dcaf0669d68d497d7216eefd1bd5963e78
Log:
Fixes bug #55225 - segfault on cleanup after dl load
makes the module information for php-gtk
available in RINIT when the classes are registered
as a nice side effect that extension reflection works
Bugs:
https://bugs.php.net/55225
Changed paths:
M main/php_gtk.c
Diff:
diff --git a/main/php_gtk.c b/main/php_gtk.c
index 871f9d5..1f2e6fe 100644
--- a/main/php_gtk.c
+++ b/main/php_gtk.c
@@ -180,6 +180,9 @@ PHP_MSHUTDOWN_FUNCTION(gtk)
PHP_RINIT_FUNCTION(gtk)
{
+ zend_module_entry *temp_module = EG(current_module);
+ EG(current_module) = phpext_php_gtk_ptr;
+
zend_alter_ini_entry("max_execution_time", sizeof("max_execution_time")-1,
"0", sizeof("0")-1,PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
php_gtk_handlers = *zend_get_std_object_handlers();
@@ -211,6 +214,7 @@ PHP_RINIT_FUNCTION(gtk)
}
php_gtk_startup_shared_extensions(module_number);
+ EG(current_module) = temp_module;
return SUCCESS;
}