mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix not thread safe xmlSchemaParse calls in ZTS builds
By calling xmlSchemaInitTypes during MINIT. See: https://gitlab.gnome.org/GNOME/libxml2/-/issues/930 Closes GH-20150.
This commit is contained in:
committed by
Niels Dossche
parent
88f8c5c0bb
commit
f14e5fcfbd
3
NEWS
3
NEWS
@@ -19,6 +19,9 @@ PHP NEWS
|
||||
. Fixed bug GH-20070 (Return type violation in imagefilter when an invalid
|
||||
filter is provided). (Girgias)
|
||||
|
||||
- LibXML:
|
||||
. Fix not thread safe xmlSchemaParse calls. (SpencerMalone)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug GH-20081 (access to uninitialized vars in preload_load()).
|
||||
(Arnaud)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#include <libxml/xmlschemas.h>
|
||||
#include <libxml/xmlschemastypes.h>
|
||||
#endif
|
||||
|
||||
#include "php_libxml.h"
|
||||
@@ -933,7 +934,11 @@ PHP_LIBXML_API void php_libxml_initialize(void)
|
||||
if (!_php_libxml_initialized) {
|
||||
/* we should be the only one's to ever init!! */
|
||||
ZEND_IGNORE_LEAKS_BEGIN();
|
||||
|
||||
xmlInitParser();
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
xmlSchemaInitTypes();
|
||||
#endif
|
||||
ZEND_IGNORE_LEAKS_END();
|
||||
|
||||
_php_libxml_default_entity_loader = xmlGetExternalEntityLoader();
|
||||
|
||||
Reference in New Issue
Block a user