Discussion:
com php/gtk-src: Fixes bug #55225 - segfault on cleanup after dl load: main/php_gtk.c
Elizabeth Marie Smith
2012-07-18 20:08:08 UTC
Permalink
Commit: b549cc2e467752bf0ac14f3d97636c25a1df4d46
Author: Elizabeth M Smith <***@gmail.com> Wed, 18 Jul 2012 15:03:24 -0400
Parents: 60214f534ea941fe23286d66c1c8a1beeeef100d
Branches: master

Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=b549cc2e467752bf0ac14f3d97636c25a1df4d46

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 e674df9..0d79fa9 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;
}
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Elizabeth Marie Smith
2012-07-18 19:03:24 UTC
Permalink
Commit: 598e23dcaf0669d68d497d7216eefd1bd5963e78
Author: Elizabeth M Smith <***@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;
}
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...