Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index



 Hello,

 do the attached patches look ok? With debug build I have unit tests failing 
because of _GLIBCXX_DEBUG mismatch (our code built with it, cppunit without), 
leading to CppUnit::Message dtor (not explicitly defined, thus generated by 
the compiler while compiling the unit test) accessing memory not allocated by 
the ctor (located in the cppunit library).

 Thanks

PS: The real question is of course "WTH does it not crash for others with 
debug build?", but I guess that'll remain a mystery.
-- 
 Lubos Lunak
 l.lunak@suse.cz
diff --git a/configure.in b/configure.in
index e21c5fe..09f9bca 100755
--- a/configure.in
+++ b/configure.in
@@ -4221,7 +4221,17 @@ dnl ===================================================================
 dnl Check for system cppunit
 dnl ===================================================================
 AC_MSG_CHECKING([which cppunit to use])
-if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
+if test -z "$ENABLE_DEBUG_STL"; then
+    AC_MSG_ERROR([Internal error, debug build check needs to precede cppunit check])
+fi
+if test "$ENABLE_DEBUG_STL" = "TRUE"; then
+    if test "$with_system_cppunit" = "yes"; then
+        AC_MSG_ERROR([--with-system-cppunit conflicts with debug build])
+    fi
+    AC_MSG_RESULT([internal, needed by debug build])
+    SYSTEM_CPPUNIT=NO
+    BUILD_TYPE="$BUILD_TYPE CPPUNIT"
+elif test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
         test "$with_system_cppunit" != "no"; then
     AC_MSG_RESULT([external])
     SYSTEM_CPPUNIT=YES
diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk
index 54c55c2..904b14e 100644
--- a/cppunit/makefile.mk
+++ b/cppunit/makefile.mk
@@ -117,6 +117,10 @@ OUT2LIB = ooo-install/lib/libcppunit.dll.a
 MY_LIBS = -lm
 .END
 
+.IF "$(ENABLE_DEBUG_STL)" == "TRUE"
+EXTRA_CFLAGS += -D_GLIBCXX_DEBUG
+.ENDIF
+
 CONFIGURE_ACTION = ./configure
 CONFIGURE_FLAGS = --prefix=$(shell cd $(PACKAGE_DIR) && \
     pwd $(PWDFLAGS))/$(TARFILE_ROOTDIR)/ooo-install \

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.