summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-09-24 17:29:21 +0200
committerMichael Stahl <mstahl@redhat.com>2012-09-24 17:51:41 +0200
commitd68113f3229d0ec8c84f77dcac3b64a3fd7e03e4 (patch)
tree0a21e828b909223e96a689d278420792c307b678 /desktop
parente5d64a0c5c5a49c55f51a1fcfed18bbb0436cc56 (diff)
soffice.bin: add a hack to detect calls to xmlCleanupParser
xmlCleanupParser frees libxml2's global variables, accessing those later on leads to hard to debug crashes. Because libxml2 is used indirectly by lots of different components, nobody is allwed to free its globals. Change-Id: I05381d3dada217db44e96445d6f6d63014f57241
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c
index ae016b498297..c18fabd158d2 100644
--- a/desktop/source/app/main.c
+++ b/desktop/source/app/main.c
@@ -25,4 +25,18 @@ SAL_IMPLEMENT_MAIN() {
return soffice_main();
}
+#ifdef DBG_UTIL
+#ifdef __gnu_linux__
+#include <stdio.h>
+#include <stdlib.h>
+
+/* HACK: detect calls to xmlCleanupParser, which causes hard to debug crashes */
+__attribute__ ((visibility("default"))) void xmlCleanupParser(void)
+{
+ fprintf(stderr, "\n*** ERROR: DO NOT call xmlCleanupParser()\n\n");
+ abort();
+}
+#endif
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */