[PHP5] If ZTS is enabled, release <module>_globals_id in MSHUTDOWN
to avoid PHP interpreter crash on shutdown. This solution was suggested here: http://bugs.php.net/bug.php?id=40985 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9670 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a5ac23e6d2
commit
8b9af6389b
2 changed files with 13 additions and 4 deletions
|
|
@ -811,10 +811,14 @@ public:
|
|||
Printf(s_init, " return SUCCESS;\n");
|
||||
Printf(s_init, "}\n\n");
|
||||
|
||||
Printf(s_init, "PHP_MSHUTDOWN_FUNCTION(%s)\n{\n", module);
|
||||
Printf(s_init, "%s\n", s_shutdown);
|
||||
Printf(s_init, " return SUCCESS;\n");
|
||||
Printf(s_init, "}\n\n");
|
||||
Printv(s_init, "PHP_MSHUTDOWN_FUNCTION(", module, ")\n"
|
||||
"{\n",
|
||||
s_shutdown,
|
||||
"#ifdef ZTS\n"
|
||||
" ts_free_id(", module, "_globals_id);\n"
|
||||
"#endif\n"
|
||||
" return SUCCESS;\n"
|
||||
"}\n\n", NIL);
|
||||
|
||||
Printf(s_init, "PHP_RSHUTDOWN_FUNCTION(%s)\n{\n", module);
|
||||
Printf(s_init, "%s\n", r_shutdown);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue