[Libreoffice-commits] core.git: 3 commits - i18npool/source solenv/bin solenv/gbuild

Michael Stahl mstahl at redhat.com
Thu May 21 15:06:13 PDT 2015


 i18npool/source/breakiterator/gendict.cxx |    2 +-
 solenv/bin/gdb-core-bt.sh                 |    4 ++++
 solenv/gbuild/CppunitTest.mk              |    7 ++++++-
 solenv/gbuild/PythonTest.mk               |    3 ++-
 4 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 5a7816b971c51ea4b642738a065e90d4d9bf12d7
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed May 20 13:18:42 2015 +0200

    gbuild: allow recording of CppunitTests and PythonTests too
    
    Since these don't use soffice they need to be tweaked to use RR varaiable.
    
    Unfortunately rr crashes in some CppunitTest so don't enable that now.
    Unfortunately rr crashes in PythonTest.
    
    Change-Id: I2143618fa2181e36b6aaeded43637cb3481f5e47

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 021ecc8..e2d8e3f 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -39,6 +39,10 @@ $(if $(ENABLE_VALGRIND),,$(call gb_Output_error,Running performance tests with e
 gb_CppunitTest_VALGRINDTOOL := valgrind --tool=callgrind --dump-instr=yes --instr-atstart=no
 endif
 
+ifneq ($(strip $(RR)),)
+gb_CppunitTest_RR := rr record
+endif
+
 # defined by platform
 #  gb_CppunitTest_get_filename
 gb_CppunitTest_RUNTIMEDEPS := $(call gb_Executable_get_runtime_dependencies,cppunittester)
@@ -99,7 +103,8 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_RUNTIMEDEPS)
 		$(if $(HEADLESS),,VCL_HIDE_WINDOWS=1) \
 		$(if $(strip $(PYTHON_URE)),\
 			PYTHONDONTWRITEBYTECODE=1) \
-		$(ICECREAM_RUN) $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTCOMMAND) \
+		$(ICECREAM_RUN) $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_RR) \
+			$(gb_CppunitTest_CPPTESTCOMMAND) \
 		$(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,$*)) \
 		$(call gb_CppunitTest__make_args) \
 		$(if $(gb_CppunitTest__interactive),, \
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index ce5f5ed..d093d38 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -52,7 +52,8 @@ $(call gb_PythonTest_get_target,%) :| $(gb_PythonTest_DEPS)
 		UserInstallation=$(call gb_Helper_make_url,$(dir $(call gb_PythonTest_get_target,$*))user) \
 		TestUserDir="$(call gb_Helper_make_url,$(dir $(call gb_PythonTest_get_target,$*)))" \
 		PYTHONDONTWRITEBYTECODE=1 \
-		$(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_PythonTest_COMMAND) \
+		$(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_RR) \
+			$(gb_PythonTest_COMMAND) \
 			$(MODULES) \
 		$(if $(gb_CppunitTest__interactive),, \
 			> $@.log 2>&1 \
commit ea980f3de1da84de730541217bd497a4d3bb3642
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed May 20 12:55:06 2015 +0200

    solenv: if RR is set, skip gdb backtrace, since it's recorded already
    
    Change-Id: I3a393e91d392c3cc572c46e94d7ea7bb1205c0c3

diff --git a/solenv/bin/gdb-core-bt.sh b/solenv/bin/gdb-core-bt.sh
index dba100e..e3965f5 100755
--- a/solenv/bin/gdb-core-bt.sh
+++ b/solenv/bin/gdb-core-bt.sh
@@ -20,6 +20,10 @@ then
         COREFILE=$(ls "$COREDIR"/core*)
         echo
         echo "It looks like ${EXECUTABLE} generated a core file at ${COREFILE}"
+        if test -n "$RR"; then
+            echo "rr is recording, skipping gdb backtrace generation"
+            exit 0
+        fi
         echo "Backtraces:"
         GDBCOMMANDFILE=$(mktemp)
         echo "thread apply all backtrace full" > "$GDBCOMMANDFILE"
commit 2589d545ec099c7b670b185d06fbf9ca841fb748
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu May 21 23:51:01 2015 +0200

    i18npool: ASAN: fix off-by-one in gendict's index2 array
    
    The charArray always contains the size of lenArray *before* it is
    extended, i.e., the last valid index.
    
    Change-Id: Id1f4e1f2cb55a88ef5339e9d962a3adf4cde91f9

diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx
index a779981..8bec7d2 100644
--- a/i18npool/source/breakiterator/gendict.cxx
+++ b/i18npool/source/breakiterator/gendict.cxx
@@ -151,8 +151,8 @@ static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sa
 #endif
         }
     }
-    lenArray.push_back( lenArrayCurr ); // store last ending pointer
     charArray[current+1] = lenArray.size();
+    lenArray.push_back( lenArrayCurr ); // store last ending pointer
 #ifndef DICT_JA_ZH_IN_DATAFILE
     fputs("\n};\n", source_fp);
 #endif


More information about the Libreoffice-commits mailing list