Commit 114c0d6e930 for php.net

commit 114c0d6e9304869db26574ac2263a8c83b5770df
Merge: d1ff85f26f8 7a8a8633ce2
Author: David Carlier <devnexen@gmail.com>
Date:   Fri Feb 27 22:18:56 2026 +0000

    Merge branch 'PHP-8.5'

    * PHP-8.5:
      ext/pcre: fix mdata_used race conditions in PCRE functions

diff --cc ext/pcre/php_pcre.c
index 7b07c8240be,8d235495f84..32ab6b0e509
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@@ -3000,11 -3015,7 +3015,13 @@@ PHPAPI void  php_pcre_grep_impl(pcre_ca
  	if (match_data != mdata) {
  		pcre2_match_data_free(match_data);
  	}
 +
+ 	mdata_used = old_mdata_used;
++
 +	if (PCRE_G(error_code) != PHP_PCRE_NO_ERROR) {
 +		zend_array_destroy(Z_ARR_P(return_value));
 +		RETURN_FALSE;
 +	}
  }
  /* }}} */