[Libreoffice-commits] core.git: external/clucene
Stephan Bergmann
sbergman at redhat.com
Fri Apr 11 03:40:59 PDT 2014
external/clucene/UnpackedTarball_clucene.mk | 1
external/clucene/patches/clucene-ub.patch | 33 ++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
New commits:
commit 213e95bb5bfd91e7946a540034cb6e2769c096cc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Apr 11 12:40:24 2014 +0200
CLucene: Some trivial GCC -fsanitize=undefined fixes
Change-Id: I40132f735eabbead0a1f16d44dbd8878b03902ce
diff --git a/external/clucene/UnpackedTarball_clucene.mk b/external/clucene/UnpackedTarball_clucene.mk
index cda5b3a..5148fb7 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-warnings.patch \
external/clucene/patches/clucene-aix.patch \
external/clucene/patches/clucene-git1-win64.patch \
+ external/clucene/patches/clucene-ub.patch \
))
ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/clucene-ub.patch b/external/clucene/patches/clucene-ub.patch
new file mode 100644
index 0000000..e1ca313
--- /dev/null
+++ b/external/clucene/patches/clucene-ub.patch
@@ -0,0 +1,33 @@
+--- src/core/CLucene/index/DocumentsWriterThreadState.cpp
++++ src/core/CLucene/index/DocumentsWriterThreadState.cpp
+@@ -994,7 +994,7 @@
+ const TCHAR* tokenText = token->termBuffer();
+ const int32_t tokenTextLen = token->termLength();
+
+- int32_t code = 0;
++ uint32_t code = 0;
+
+ // Compute hashcode
+ int32_t downto = tokenTextLen;
+@@ -1203,7 +1203,7 @@
+ const int32_t newMask = newSize-1;
+
+ ValueArray<Posting*> newHash(newSize);
+- int32_t hashPos, code;
++ int32_t hashPos; uint32_t code;
+ const TCHAR* pos = NULL;
+ const TCHAR* start = NULL;
+ Posting* p0;
+--- src/core/CLucene/store/IndexInput.cpp
++++ src/core/CLucene/store/IndexInput.cpp
+@@ -41,8 +41,8 @@
+ }
+
+ int64_t IndexInput::readLong() {
+- int64_t i = ((int64_t)readInt() << 32);
+- return (i | ((int64_t)readInt() & 0xFFFFFFFFL));
++ uint64_t i = ((uint64_t)readInt() << 32);
++ return (i | ((uint64_t)readInt() & 0xFFFFFFFFL));
+ }
+
+ int64_t IndexInput::readVLong() {
More information about the Libreoffice-commits
mailing list