Hi. I've been doing some research on the bug 17414 (segfaults on restart when using apache2filter).
It appears that the segfault results from bad(?) pthreads implementation. The TSRM deletes and recreates the TSD key. And it seems to result that the main thread will have the old TSD value instead of zero for the newly recreated key. See attached patch that seems to work around this problem. Atleast, it Works-For-Me(tm). Cheers, Timo -- Timo Teräs [EMAIL PROTECTED]
diff -ru php-4.3.3RC1/TSRM/TSRM.c php-4.3.3RC1-tt/TSRM/TSRM.c --- php-4.3.3RC1/TSRM/TSRM.c 2003-07-21 13:48:15.000000000 +0300 +++ php-4.3.3RC1-tt/TSRM/TSRM.c 2003-07-21 13:41:56.000000000 +0300 @@ -181,6 +181,7 @@ #if defined(GNUPTH) pth_kill(); #elif defined(PTHREADS) + pthread_setspecific(tls_key, 0); pthread_key_delete(tls_key); #elif defined(TSRM_WIN32) TlsFree(tls_key);
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php