Kaydet (Commit) c01904f9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

external/clucene: Avoid InitOrderFiasco

...as reported by AddressSanitizer, where src/core/CLucene/index/IndexWriter.cpp
initializes IndexWriter::MAX_TERM_LENGTH with the value of
DocumentsWriter::MAX_TERM_LENGTH before the latter is initialized in
src/core/CLucene/index/DocumentsWriter.cpp.  But turns out that
IndexWriter::MAX_TERM_LENGTH is completely unused.

Change-Id: Ica01186584ec05a989a13dc58823f4751e8724e2
üst 51a211ca
...@@ -34,6 +34,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\ ...@@ -34,6 +34,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-git1-win64.patch \ external/clucene/patches/clucene-git1-win64.patch \
external/clucene/patches/clucene-ub.patch \ external/clucene/patches/clucene-ub.patch \
external/clucene/patches/clucene-mutex.patch \ external/clucene/patches/clucene-mutex.patch \
external/clucene/patches/clucene-asan.patch \
)) ))
ifneq ($(OS),WNT) ifneq ($(OS),WNT)
......
--- src/core/CLucene/index/IndexWriter.cpp
+++ src/core/CLucene/index/IndexWriter.cpp
@@ -53,7 +53,6 @@
DEFINE_MUTEX(IndexWriter::MESSAGE_ID_LOCK)
int32_t IndexWriter::MESSAGE_ID = 0;
-const int32_t IndexWriter::MAX_TERM_LENGTH = DocumentsWriter::MAX_TERM_LENGTH;
class IndexWriter::Internal{
public:
--- src/core/CLucene/index/IndexWriter.h
+++ src/core/CLucene/index/IndexWriter.h
@@ -384,13 +384,6 @@
*/
static const int32_t DEFAULT_MAX_MERGE_DOCS;
- /**
- * Absolute hard maximum length for a term. If a term
- * arrives from the analyzer longer than this length, it
- * is skipped and a message is printed to infoStream, if
- * set (see {@link #setInfoStream}).
- */
- static const int32_t MAX_TERM_LENGTH;
/* Determines how often segment indices are merged by addDocument(). With
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment