com php-src: Merge branch 'PHP-7.1' into PHP-7.2: ext/pcre/php _pcre.c

From: Date: Wed, 06 Dec 2017 15:04:22 +0000
Subject: com php-src: Merge branch 'PHP-7.1' into PHP-7.2: ext/pcre/php _pcre.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-100509@lists.php.net to get a copy of this message
Commit: 57f33b4ce269bdd169332d945d85ca96587874b5 Author: Anatol Belski <ab@php.net> Wed, 6 Dec 2017 16:04:22 +0100 Parents: d4af2046372dd33e2364c6862ada3a9333f75907 1b29dc0b1c4836085a17cbf2f59dae8aeb85424c Branches: PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=57f33b4ce269bdd169332d945d85ca96587874b5 Log: Merge branch 'PHP-7.1' into PHP-7.2 * PHP-7.1: Fix yet one data race in PCRE Changed paths: MM ext/pcre/php_pcre.c Diff: diff --cc ext/pcre/php_pcre.c index 5ec7f4d,bf8e02c..2fb1133 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@@ -68,10 -67,10 +68,10 @@@ PHPAPI ZEND_DECLARE_MODULE_GLOBALS(pcre #define PCRE_JIT_STACK_MAX_SIZE (64 * 1024) ZEND_TLS pcre_jit_stack *jit_stack = NULL; #endif - #if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT) + #if defined(ZTS) static MUTEX_T pcre_mt = NULL; -#define php_pcre_mutex_alloc() if (!pcre_mt) pcre_mt = tsrm_mutex_alloc(); -#define php_pcre_mutex_free() if (pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL; +#define php_pcre_mutex_alloc() if (tsrm_is_main_thread() && !pcre_mt) pcre_mt = tsrm_mutex_alloc(); +#define php_pcre_mutex_free() if (tsrm_is_main_thread() && pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL; #define php_pcre_mutex_lock() tsrm_mutex_lock(pcre_mt); #define php_pcre_mutex_unlock() tsrm_mutex_unlock(pcre_mt); #else

« previous php.cvs (#100509) next »