#
4fe82131 |
| 04-Jul-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Backport libxml2 2.13.2 fixes (#14816) Backproted from https://github.com/php/php-src/pull/14789
|
#
120bd364 |
| 22-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix crashes with entity references and predefined entities Closes GH-13004.
|
#
5f69232b |
| 23-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Revert "Fix crashes with entity references and predefined entities" This reverts commit 3fa5af8496bdbc74e24828b790e4acfd6a26f0d4.
|
#
bb007438 |
| 23-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix libxml2 build for 2.12.0-2.12.2
|
#
3fa5af84 |
| 22-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix crashes with entity references and predefined entities There's two issues here: - freeing of predefined entity declaration crashes (unique to 8.3 & master) - using multiple entit
Fix crashes with entity references and predefined entities There's two issues here: - freeing of predefined entity declaration crashes (unique to 8.3 & master) - using multiple entity references for a single entity declaration crashes (since forever) The fix for the last issue is fairly easy to do on 8.3, but may require a slightly different approach on 8.2. Therefore, for now this is 8.3-only. Closes GH-13004.
show more ...
|
#
0a39890c |
| 01-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix libxml2 2.12 build due to API breaks See https://github.com/php/php-src/actions/runs/7062192818/job/19225478601
|
#
eebc528c |
| 01-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix broken cache invalidation with deallocated and reallocated document node The original caching implementation had an oversight in combination with the new lifetime management in DOM f
Fix broken cache invalidation with deallocated and reallocated document node The original caching implementation had an oversight in combination with the new lifetime management in DOM for 8.3. The modification counter is stored on the document object itself, but as that can get deallocated when all references disappear, stale cache data can be used. Normally this isn't a problem, unless getElementsByTagName is called not on the document but on a child node. Fix it by moving caching data into the ref object, which will outlive all nodes from a document even if the document object disappears. Closes GH-12338.
show more ...
|
#
df89409a |
| 29-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix compile error with -Werror=incompatible-function-pointer-types and old libxml2 libxml2 prior to 2.9.8 had a different signature for xmlHashScanner. This signature changed in https://
Fix compile error with -Werror=incompatible-function-pointer-types and old libxml2 libxml2 prior to 2.9.8 had a different signature for xmlHashScanner. This signature changed in https://github.com/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732b2b4cae787 Use an #if to work around the incompatible signature. Closes GH-12326.
show more ...
|
#
e648d39e |
| 26-Aug-2023 |
David CARLIER |
libxml set error structure simplification proposal (#12054)
|
#
e1cb7216 |
| 22-Aug-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Improve warning when returning null from the resolver set by libxml_set_external_entity_loader Fixes GH-11952. Closes GH-12022.
|
#
bb092ab4 |
| 06-Aug-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix #80927: Removing documentElement after creating attribute node: possible use-after-free Closes GH-11892.
|
#
5018dfec |
| 06-Aug-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove useless hashmap check php_libxml_unlink_entity is called from a hashmap iterator, so using xmlHashLookup to check if it comes from that hashmap will always be true.
|
#
75229cb1 |
| 10-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Cleanup php_libxml_node_decrement_resource() obj_node is already checked, so checking it again in the second if is not necessary. Merge declarations and assignments while we're at it.
|
#
003ebdd0 |
| 02-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-9628: Implicitly removing nodes from \DOMDocument breaks existing references Change the way lifetime works in ext/libxml and ext/dom Previously, a node could be freed even wh
Fix GH-9628: Implicitly removing nodes from \DOMDocument breaks existing references Change the way lifetime works in ext/libxml and ext/dom Previously, a node could be freed even when holding a userland reference to it. This resulted in exceptions when trying to access that node after it has been implicitly or explicitly removed. After this patch, a node will only be freed when the last userland reference disappears. Fixes GH-9628. Closes GH-11576.
show more ...
|
#
50b4df18 |
| 08-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Get rid of return value for php_libxml_unregister_node() (#11398)
|
#
c3f07973 |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement iteration cache, item cache and length cache for node list iteration (#11330) * Implement iteration cache, item cache and length cache for node list iteration The current
Implement iteration cache, item cache and length cache for node list iteration (#11330) * Implement iteration cache, item cache and length cache for node list iteration The current implementation follows the spec requirement that the list must be "live". This means that changes in the document must be reflected in the existing node lists without requiring the user to refetch the node list. The consequence is that getting any item, or the length of the list, always starts searching from the root element of the node list. This results in O(n) time to get any item or the length. If there's a for loop over the node list, this means the iterations will take O(n²) time in total. This causes real-world performance issues with potential for downtime (see GH-11308 and its references for details). We fix this by introducing a caching strategy. We cache the last iterated object in the iterator, the last requested item in the node list, and the last length computation. To invalidate the cache, we simply count the number of modifications made to the containing document. If the modification number does not match what the number was during caching, we know the document has been modified and the cache is invalid. If this ever overflows, we saturate the modification number and don't do any caching anymore. Note that we don't check for overflow on 64-bit systems because it would take hundreds of years to overflow. Fixes GH-11308.
show more ...
|
#
7c0dfc5c |
| 29-Apr-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-11160: Few tests failed building with new libxml 2.11.0 It's possible to categorise the failures into 2 categories: - Changed error message. In this case we either duplicate the
Fix GH-11160: Few tests failed building with new libxml 2.11.0 It's possible to categorise the failures into 2 categories: - Changed error message. In this case we either duplicate the test and modify the error message. Or if the change in error message is small, we use the EXPECTF matchers to make the test compatible with both old and new versions of libxml2. - Missing warnings. This is caused by a change in libxml2 where the parser started using SAX APIs internally [1]. In this case the error_type passed to php_libxml_internal_error_handler() changed from PHP_LIBXML_ERROR to PHP_LIBXML_CTX_WARNING because it internally started to use the SAX handlers instead of the generic handlers. However, for the SAX handlers the current input stack is empty, so nothing is actually printed. I fixed this by falling back to a regular warning without a filename & line number reference, which mimicks the old behaviour. Furthermore, this change now also shows an additional warning in a test which was previously hidden. [1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/9a82b94a94bd310db426edd453b0f38c6c8f69f5 Closes GH-11162.
show more ...
|
#
1287747a |
| 21-Feb-2023 |
Max Kellermann |
ext: make various internal functions static (#10650) Namely in: * ext/date * ext/libxml * ext/dba * ext/curl
|
#
32d3cae1 |
| 22-Nov-2022 |
George Peter Banyard |
Handle trampolines correctly in new FCC API + usages (#9877)
|
#
fb114bf4 |
| 01-Nov-2022 |
George Peter Banyard |
Only use FCC for libxml entity loader callback
|
Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1 |
|
#
11796229 |
| 21-Jan-2022 |
Tim Starling |
Add libxml_get_external_entity_loader() Add libxml_get_external_entity_loader(), which returns the currently installed external entity loader, i.e. the value which was passed to libx
Add libxml_get_external_entity_loader() Add libxml_get_external_entity_loader(), which returns the currently installed external entity loader, i.e. the value which was passed to libxml_set_external_entity_loader() or null if no loader was installed and the default entity loader will be used. This allows libraries to save and restore the loader, controlling entity expansion without interfering with the rest of the application. Add macro Z_PARAM_FUNC_OR_NULL_WITH_ZVAL(). This allows us to get the zval for a callable parameter without duplicating callable argument parsing. The saved zval keeps the object needed for fcc/fci alive, simplifying memory management. Fixes #76763.
show more ...
|
#
f5975469 |
| 24-Aug-2022 |
Christoph M. Becker |
xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0 The documentation[1] suggest to call `xmlCleanupParser()` instead, but we are not doing that for reasons[2]. Thus, we do no l
xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0 The documentation[1] suggest to call `xmlCleanupParser()` instead, but we are not doing that for reasons[2]. Thus, we do no longer call `xmlRelaxNGCleanupTypes()` for libxml2 ≥ 2.10.0. [1] <https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-relaxng.html#xmlRelaxNGCleanupTypes> [2] <https://github.com/php/php-src/commit/8742276eb3905eb97a585417000c7b8df85006d4> Closes GH-9417.
show more ...
|
#
7601068f |
| 09-Jun-2022 |
Máté Kocsis |
Declare ext/libxml constants in stubs (#8721)
|
Revision tags: php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1 |
|
#
2f529569 |
| 29-Dec-2021 |
Ilija Tovilo |
Optimize stripos/stristr Closes GH-7847 Closes GH-7852 Previously stripos/stristr would lowercase both the haystack and the needle to reuse strpos. The approach in this PR i
Optimize stripos/stristr Closes GH-7847 Closes GH-7852 Previously stripos/stristr would lowercase both the haystack and the needle to reuse strpos. The approach in this PR is similar to strpos. memchr is highly optimized so we're using it to search for the first character of the needle in the haystack. If we find it we compare the remaining characters of the needle manually. The new implementation seems to perform about half as well as strpos (as two memchr calls are necessary to find the next candidate).
show more ...
|
Revision tags: php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22 |
|
#
f15f8fc5 |
| 01-Sep-2020 |
Christoph M. Becker |
Fix #79971: special character is breaking the path in xml function The libxml based XML functions accepting a filename actually accept URIs with possibly percent-encoded characters. Per
Fix #79971: special character is breaking the path in xml function The libxml based XML functions accepting a filename actually accept URIs with possibly percent-encoded characters. Percent-encoded NUL bytes lead to truncation, like non-encoded NUL bytes would. We catch those, and let the functions fail with a respective warning.
show more ...
|