From: Anatol Belski Date: Thu, 21 Dec 2017 12:49:05 +0000 (+0100) Subject: Merge branch 'PHP-7.1' into PHP-7.2 X-Git-Tag: php-7.2.2RC1~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddd401859c0c0c311e70b964262d1274f4ca8035;p=php Merge branch 'PHP-7.1' into PHP-7.2 * PHP-7.1: Fix segfault. Compile param --with-tsrm-pth=yes --- ddd401859c0c0c311e70b964262d1274f4ca8035 diff --cc TSRM/TSRM.c index cde8437790,9fb8abd3a4..ed1f24f8b8 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@@ -121,13 -125,12 +126,14 @@@ static int32 tls_key # warning tsrm_set_interpreter_context is probably broken on this platform #endif +TSRM_TLS uint8_t in_main_thread = 0; + /* Startup TSRM (call once for the entire process) */ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename) -{ +{/*{{{*/ #if defined(GNUPTH) pth_init(); + pth_key_create(&tls_key, 0); #elif defined(PTHREADS) pthread_key_create( &tls_key, 0 ); #elif defined(TSRM_ST)