[Libreoffice-commits] .: 2 commits - liblangtag/liblangtag-0.2-xmlCleanupParser.patch liblangtag/makefile.mk
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 20 06:48:14 PDT 2012
liblangtag/liblangtag-0.2-xmlCleanupParser.patch | 20 ++++++++++++++++++++
liblangtag/makefile.mk | 9 +++++++++
2 files changed, 29 insertions(+)
New commits:
commit 5e6c595e9d698caf23ae68d38b9cab30ff9c9b94
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 20 15:40:30 2012 +0200
Do not call xmlCleanupParser from liblangtag
Despite its name, it is a cleanup function for libxml2 that must only be called
when the process as a whole no longer needs libxml2. Calling it from a library
like liblangtag is not appropriate (just like liblangtag does not call
xmlInitParser, either).
In LibreOffice, this caused confusion about pthread keys for thread-local
storage (xmlCleanupParser calls pthread_key_delete, but apparently if libxml2 is
later used by unrelated code in LibreOffice again, it still uses the stale key,
and if that key is now reused via an unrelated pthread_key_create, arbitrary
crashes happen during thread termination in pthread's __nptl_deallocate_tsd).
Change-Id: I82cef8bc400d48f19eaa94f26d50d4b8589da106
diff --git a/liblangtag/liblangtag-0.2-xmlCleanupParser.patch b/liblangtag/liblangtag-0.2-xmlCleanupParser.patch
new file mode 100644
index 0000000..3617125
--- /dev/null
+++ b/liblangtag/liblangtag-0.2-xmlCleanupParser.patch
@@ -0,0 +1,20 @@
+--- misc/liblangtag-0.2/liblangtag/lt-xml.c
++++ misc/build/liblangtag-0.2/liblangtag/lt-xml.c
+@@ -101,8 +101,6 @@ lt_xml_read_subtag_registry(lt_xml_t *x
+ if (xmlparser)
+ xmlFreeParserCtxt(xmlparser);
+
+- xmlCleanupParser();
+-
+ if (err) {
+ if (error)
+ *error = g_error_copy(err);
+@@ -158,8 +156,6 @@ lt_xml_read_cldr_bcp47(lt_xml_t *xml
+ if (xmlparser)
+ xmlFreeParserCtxt(xmlparser);
+
+- xmlCleanupParser();
+-
+ if (err) {
+ if (error)
+ *error = g_error_copy(err);
diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk
index 39ca099..5c73c74 100644
--- a/liblangtag/makefile.mk
+++ b/liblangtag/makefile.mk
@@ -42,6 +42,7 @@ PATCH_FILES+=liblangtag-0.2-configure.patch
PATCH_FILES+=liblangtag-0.2-datadir.patch
PATCH_FILES+=liblangtag-0.2-msvc-warning.patch
PATCH_FILES+=liblangtag-0.2-reg2xml-encoding-problem.patch
+PATCH_FILES+=liblangtag-0.2-xmlCleanupParser.patch
CONFIGURE_DIR=.
BUILD_DIR=$(CONFIGURE_DIR)
commit 179a6db61ee30cf776747802f06edeef45fec461
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 20 15:00:50 2012 +0200
Add RPATH to liblangtag
...so that it consistenly uses the LO versions of libxml2/glibc libs at runtime.
Change-Id: I89b7fd13a8b5b7e697ec21db74fdf8ef088fdb92
diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk
index ae6f58e..39ca099 100644
--- a/liblangtag/makefile.mk
+++ b/liblangtag/makefile.mk
@@ -101,6 +101,14 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure
BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) && \
$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) install DESTDIR=$(my_destdir)
+.IF "$(SYSTEM_LIBXML)"!="YES" || "$(SYSTEM_GLIB)"!="YES"
+.IF "$(OS)"=="FREEBSD" || "$(OS)"=="LINUX"
+CONFIGURE_FLAGS+= \
+ LDFLAGS=-Wl,-z,origin\ -Wl,-rpath,\'\$$\$$ORIGIN:\$$\$$ORIGIN/../ure-link/lib\'
+.ELIF "$(OS)"=="SOLARIS"
+CONFIGURE_FLAGS+= LDFLAGS=-Wl,-R\'\$$\$$ORIGIN:\$$\$$ORIGIN/../ure-link/lib\'
+.END
+.END
.IF "$(GUI)"=="WNT"
.IF "$(COM)"=="GCC"
More information about the Libreoffice-commits
mailing list