]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.1' into PHP-7.2
authorAnatol Belski <ab@php.net>
Thu, 21 Dec 2017 12:49:05 +0000 (13:49 +0100)
committerAnatol Belski <ab@php.net>
Thu, 21 Dec 2017 12:49:05 +0000 (13:49 +0100)
* PHP-7.1:
  Fix segfault. Compile param --with-tsrm-pth=yes

1  2 
TSRM/TSRM.c

diff --cc TSRM/TSRM.c
index cde84377902a09cff8c41612c3339f463c361d74,9fb8abd3a4d1d3db2efd03ee44e635499a8a9294..ed1f24f8b81d343088b489b65eb2940aa3906ae4
@@@ -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)