> There is a serious bug in PHP that seems to lead to inconsistent handling > of memory allocation that affects code that uses functions like strtok from > inside session handler functions. That is a *very* inaccurate description. It affects only session handler functions which are called during the request shutdown (write, close). It does not affect the other four handlers. Second, it is not a general problem with memory allocations. Strtok just assumed that it would not be called after request shutdown. The attached patch should fix that. - 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 General 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]