Skip to content

Commit

Permalink
Fast elimination of the segmentation-fault on exit after restoring mo…
Browse files Browse the repository at this point in the history
…dified internal functions (5.2.6 x86_64). As the crash occured when the PHP have executed the global-functions table destructor for each function again, the destructor pointer nulling cures the problem.
  • Loading branch information
zenovich committed Nov 2, 2009
1 parent fdfb93d commit a8229a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runkit_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ int php_runkit_restore_internal_functions(zend_internal_function *fe, int num_ar
zend_hash_update(EG(function_table), hash_key->arKey, hash_key->nKeyLength, (void*)fe, sizeof(zend_function), NULL);
#endif

EG(function_table)->pDestructor = NULL;
return ZEND_HASH_APPLY_REMOVE;
}
/* }}} */
Expand Down

0 comments on commit a8229a1

Please sign in to comment.