diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-12-02 15:38:42 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-12-02 15:41:12 +0000 |
commit | 902e71fcd3639928d27a16f9b8dbb2118ae15738 (patch) | |
tree | cfe86e24098f54d722376a084a2cb703a7c11e51 /main/libxml2 | |
parent | 8022bb4b09eeb11d7fe081b4dceafc0e7dfa7192 (diff) | |
download | aports-902e71fcd3639928d27a16f9b8dbb2118ae15738.tar.bz2 aports-902e71fcd3639928d27a16f9b8dbb2118ae15738.tar.xz |
main/libxml2: revert upstream commit
revert upstream commit that makes xmlFreeNodeLists non-recursive.
Reverting this fixes perl-xml-libxslt testsuite on 32 bit arches.
Report at SUSE: https://bugzilla.suse.com/show_bug.cgi?id=1157450
Upstream report: https://github.com/shlomif/perl-XML-LibXSLT/issues/2
Diffstat (limited to 'main/libxml2')
-rw-r--r-- | main/libxml2/APKBUILD | 9 | ||||
-rw-r--r-- | main/libxml2/revert-Make-xmlFreeNodeList-non-recursive.patch | 64 |
2 files changed, 70 insertions, 3 deletions
diff --git a/main/libxml2/APKBUILD b/main/libxml2/APKBUILD index aef741b205..48c32ae6ab 100644 --- a/main/libxml2/APKBUILD +++ b/main/libxml2/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=libxml2 pkgver=2.9.10 -pkgrel=0 +pkgrel=1 pkgdesc="XML parsing library, version 2" url="http://www.xmlsoft.org/" arch="all" @@ -13,7 +13,9 @@ makedepends="$depends_dev python3-dev" subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-utils py3-$pkgname:_py3" options="!strip" -source="http://xmlsoft.org/sources/libxml2-$pkgver.tar.gz" +source="http://xmlsoft.org/sources/libxml2-$pkgver.tar.gz + revert-Make-xmlFreeNodeList-non-recursive.patch + " # secfixes: # 2.9.8-r1: @@ -99,4 +101,5 @@ utils() { mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } -sha512sums="0adfd12bfde89cbd6296ba6e66b6bed4edb814a74b4265bda34d95c41d9d92c696ee7adb0c737aaf9cc6e10426a31a35079b2a23d26c074e299858da12c072ed libxml2-2.9.10.tar.gz" +sha512sums="0adfd12bfde89cbd6296ba6e66b6bed4edb814a74b4265bda34d95c41d9d92c696ee7adb0c737aaf9cc6e10426a31a35079b2a23d26c074e299858da12c072ed libxml2-2.9.10.tar.gz +347178e432379d543683cba21b902e7305202c03e8dbd724ae395963d677096a5cfc4e345e208d498163ca5174683c167610fc2b297090476038bc2bb7c84b4f revert-Make-xmlFreeNodeList-non-recursive.patch" diff --git a/main/libxml2/revert-Make-xmlFreeNodeList-non-recursive.patch b/main/libxml2/revert-Make-xmlFreeNodeList-non-recursive.patch new file mode 100644 index 0000000000..102abdb313 --- /dev/null +++ b/main/libxml2/revert-Make-xmlFreeNodeList-non-recursive.patch @@ -0,0 +1,64 @@ +This is a revert of +https://github.com/GNOME/libxml2/commit/0762c9b69ba01628f72eada1c64ff3d361fb5716 + +This fixes perl-xml-libxslt test suite +https://bugzilla.suse.com/show_bug.cgi?id=1157450 + +diff --git a/tree.c b/tree.c +index 08b1a50..f2b1457 100644 +--- a/tree.c ++++ b/tree.c +@@ -3664,9 +3664,7 @@ xmlNextElementSibling(xmlNodePtr node) { + void + xmlFreeNodeList(xmlNodePtr cur) { + xmlNodePtr next; +- xmlNodePtr parent; + xmlDictPtr dict = NULL; +- size_t depth = 0; + + if (cur == NULL) return; + if (cur->type == XML_NAMESPACE_DECL) { +@@ -3682,21 +3680,16 @@ xmlFreeNodeList(xmlNodePtr cur) { + return; + } + if (cur->doc != NULL) dict = cur->doc->dict; +- while (1) { +- while ((cur->children != NULL) && +- (cur->type != XML_DTD_NODE) && +- (cur->type != XML_ENTITY_REF_NODE)) { +- cur = cur->children; +- depth += 1; +- } +- ++ while (cur != NULL) { + next = cur->next; +- parent = cur->parent; + if (cur->type != XML_DTD_NODE) { + + if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue)) + xmlDeregisterNodeDefaultValue(cur); + ++ if ((cur->children != NULL) && ++ (cur->type != XML_ENTITY_REF_NODE)) ++ xmlFreeNodeList(cur->children); + if (((cur->type == XML_ELEMENT_NODE) || + (cur->type == XML_XINCLUDE_START) || + (cur->type == XML_XINCLUDE_END)) && +@@ -3727,16 +3720,7 @@ xmlFreeNodeList(xmlNodePtr cur) { + DICT_FREE(cur->name) + xmlFree(cur); + } +- +- if (next != NULL) { +- cur = next; +- } else { +- if ((depth == 0) || (parent == NULL)) +- break; +- depth -= 1; +- cur = parent; +- cur->children = NULL; +- } ++ cur = next; + } + } + |