On 8 Jul 2001 [EMAIL PROTECTED] wrote: > ID: 11826 > Updated by: manuel > Reported By: [EMAIL PROTECTED] > Status: Open > Bug Type: Reproducible crash > Operating System: WinMe, Linux > PHP Version: 4.0.4 > New Comment: > > I have isolated the bug but did not find the cause. It makes strtok() > crash when attempting to free memory that has been trashed. Calling certain functions during request shutdown is problematic. strtok is one of these functions. Please try the attached patch. You should get a leak warning now instead of a crash.. - Sascha Experience IRCG http://schumann.cx/ http://schumann.cx/ircg
Index: basic_functions.c =================================================================== RCS file: /repository/php4/ext/standard/basic_functions.c,v retrieving revision 1.355 diff -u -r1.355 basic_functions.c --- basic_functions.c 2001/07/04 10:10:29 1.355 +++ basic_functions.c 2001/07/08 23:09:25 @@ -885,6 +885,7 @@ BLS_FETCH(); STR_FREE(BG(strtok_string)); + BG(strtok_string) = NULL; #ifdef HAVE_PUTENV zend_hash_destroy(&BG(putenv_ht)); #endif
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]