Upstream 1.1.26 release, daniel

This commit is contained in:
Daniel Veillard 2009-09-24 14:51:45 +00:00
parent 80a6df1bb3
commit d0ba9b8217
4 changed files with 8 additions and 129 deletions

View File

@ -14,3 +14,4 @@ libxslt-1.1.22.tar.gz
libxslt-1.1.23.tar.gz
libxslt-1.1.24.tar.gz
libxslt-1.1.25.tar.gz
libxslt-1.1.26.tar.gz

View File

@ -1,125 +0,0 @@
commit 2e8defa7ccef2f76fb1cbfe9e9673d8e4b6cf1d6
Author: Daniel Veillard <veillard@redhat.com>
Date: Sun Sep 20 11:51:52 2009 +0200
595612 Try to fix some locking problems
* libxslt/extensions.c: there were still cases where the normal
code path could led to trying to mtake again the extension lock
go over all entry points of the module and clean things up
diff --git a/libxslt/extensions.c b/libxslt/extensions.c
index ebb81f5..6187b7a 100644
--- a/libxslt/extensions.c
+++ b/libxslt/extensions.c
@@ -313,8 +313,6 @@ typedef void (*exsltRegisterFunction) (void);
* by LIBXSLT_DEFAULT_PLUGINS_PATH() which is determined at
* compile time.
*
- * Always called with xsltExtMutex lock taken.
- *
* Returns 0 if successful, -1 in case of error.
*/
@@ -550,10 +548,14 @@ xsltRegisterExtPrefix(xsltStylesheetPtr style,
if (xsltExtensionsHash != NULL) {
xsltExtModulePtr module;
+ xmlMutexLock(xsltExtMutex);
module = xmlHashLookup(xsltExtensionsHash, URI);
+ xmlMutexUnlock(xsltExtMutex);
if (NULL == module) {
if (!xsltExtModuleRegisterDynamic(URI)) {
+ xmlMutexLock(xsltExtMutex);
module = xmlHashLookup(xsltExtensionsHash, URI);
+ xmlMutexUnlock(xsltExtMutex);
}
}
if (module != NULL) {
@@ -1669,18 +1671,13 @@ xsltExtElementLookup(xsltTransformContextPtr ctxt,
if ((name == NULL) || (URI == NULL))
return (NULL);
- xmlMutexLock(xsltExtMutex);
-
if ((ctxt != NULL) && (ctxt->extElements != NULL)) {
XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt->extElements, name, URI);
if (ret != NULL) {
- xmlMutexUnlock(xsltExtMutex);
return(ret);
}
}
- xmlMutexUnlock(xsltExtMutex);
-
ret = xsltExtModuleElementLookup(name, URI);
return (ret);
@@ -1707,19 +1704,23 @@ xsltExtModuleElementLookup(const xmlChar * name, const xmlChar * URI)
ext = (xsltExtElementPtr) xmlHashLookup2(xsltElementsHash, name, URI);
+ xmlMutexUnlock(xsltExtMutex);
+
/*
* if function lookup fails, attempt a dynamic load on
* supported platforms
*/
if (NULL == ext) {
if (!xsltExtModuleRegisterDynamic(URI)) {
+ xmlMutexLock(xsltExtMutex);
+
ext = (xsltExtElementPtr)
xmlHashLookup2(xsltElementsHash, name, URI);
+
+ xmlMutexUnlock(xsltExtMutex);
}
}
- xmlMutexUnlock(xsltExtMutex);
-
if (ext == NULL)
return (NULL);
return (ext->transform);
@@ -1747,13 +1748,18 @@ xsltExtModuleElementPreComputeLookup(const xmlChar * name,
ext = (xsltExtElementPtr) xmlHashLookup2(xsltElementsHash, name, URI);
+ xmlMutexUnlock(xsltExtMutex);
+
if (ext == NULL) {
if (!xsltExtModuleRegisterDynamic(URI)) {
+ xmlMutexLock(xsltExtMutex);
+
ext = (xsltExtElementPtr)
xmlHashLookup2(xsltElementsHash, name, URI);
+
+ xmlMutexUnlock(xsltExtMutex);
}
}
- xmlMutexUnlock(xsltExtMutex);
if (ext == NULL)
return (NULL);
@@ -1856,15 +1862,19 @@ xsltExtModuleTopLevelLookup(const xmlChar * name, const xmlChar * URI)
XML_CAST_FPTR(ret) = xmlHashLookup2(xsltTopLevelsHash, name, URI);
+ xmlMutexUnlock(xsltExtMutex);
+
/* if lookup fails, attempt a dynamic load on supported platforms */
if (NULL == ret) {
if (!xsltExtModuleRegisterDynamic(URI)) {
+ xmlMutexLock(xsltExtMutex);
+
XML_CAST_FPTR(ret) = xmlHashLookup2(xsltTopLevelsHash, name, URI);
+
+ xmlMutexUnlock(xsltExtMutex);
}
}
- xmlMutexUnlock(xsltExtMutex);
-
return (ret);
}

View File

@ -1,7 +1,7 @@
Summary: Library providing the Gnome XSLT engine
Name: libxslt
Version: 1.1.25
Release: 2%{?dist}%{?extra_release}
Version: 1.1.26
Release: 1%{?dist}%{?extra_release}
License: MIT
Group: Development/Libraries
Source: ftp://xmlsoft.org/XSLT/libxslt-%{version}.tar.gz
@ -15,7 +15,6 @@ BuildRequires: libgcrypt-devel
Prefix: %{_prefix}
Docdir: %{_docdir}
Patch0: multilib.patch
Patch1: libxslt-1.1.25-locking.patch
%description
This C library allows to transform XML files into other XML files
@ -57,7 +56,6 @@ with XPath functions written in Python.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
%configure
@ -132,6 +130,10 @@ rm -fr %{buildroot}
%doc python/tests/*.xsl
%changelog
* Thu Sep 24 2009 Daniel Veillard <veillard@redhat.com> 1.1.26-1
- couple of bug fixes
- export a symbol needed by lxml
* Mon Sep 21 2009 Daniel Veillard <veillard@redhat.com> 1.1.25-2
- fix a locking bug in 1.1.25

View File

@ -1 +1,2 @@
50c5ba1218262ac10669961b32db405a libxslt-1.1.25.tar.gz
e61d0364a30146aaa3001296f853b2b9 libxslt-1.1.26.tar.gz