[Libreoffice-commits] core.git: external/clucene

2023-09-15 Thread Mike Kaganski (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |1 +
 external/clucene/patches/clucene-pure-virtual.patch |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit c36fd4286c93da4b7b56da95b9693a97e0be71fc
Author: Mike Kaganski 
AuthorDate: Fri Sep 15 15:21:37 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Sep 15 16:57:46 2023 +0200

tdf#157254: CLucene: fix pure virtual call in destructor

When HelpIndexer::indexDocuments creates lucene::index::IndexWriter
with a long path like

C:\lo\src\build\workdir\longPathTest_123456789012345678901234567890123456789012345678901234567890\instdir\program\..\program\..\user\extensions\bundled\registry\com.sun.star.comp.deployment.help.PackageRegistryBackend\lu149121qyy8a.tmp\da\help.idxl
then CLucene's FSDirectory::FSIndexOutput::FSIndexOutput may fail
and throw, which would unwind, and call FSIndexOutput destructor,
then procede to inherited BufferedIndexOutput destructor, which
calls close(), which calls flush(), which finally calls flushBuffer;
and that one was pure virtual in BufferedIndexOutput, which meant,
that in BufferedIndexOutput destructor, that was a pure virtual
function call, crashing the process.

Patch CLucene to have a default implementation of the function,
usable in its destructor.

Change-Id: I6f84c8cf2bd24b9bb92a71da485089ebf832530a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156944
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 76ceeb08f523..7a1eed67d2f7 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -53,6 +53,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/write-strings.patch \
external/clucene/patches/nullstring.patch \
external/clucene/patches/binary_function.patch \
+   external/clucene/patches/clucene-pure-virtual.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/clucene-pure-virtual.patch 
b/external/clucene/patches/clucene-pure-virtual.patch
new file mode 100644
index ..0d4f95fe538f
--- /dev/null
+++ b/external/clucene/patches/clucene-pure-virtual.patch
@@ -0,0 +1,11 @@
+--- src/core/CLucene/store/IndexOutput.h
 src/core/CLucene/store/IndexOutput.h
+@@ -159,7 +159,7 @@
+   * @param b the bytes to write
+   * @param len the number of bytes to write
+   */
+-  virtual void flushBuffer(const uint8_t* b, const int32_t len) = 0;
++  virtual void flushBuffer(const uint8_t* /*b*/, const int32_t /*len*/) {}
+ };
+ 
+ CL_NS_END


[Libreoffice-commits] core.git: external/clucene

2023-07-17 Thread Stephan Bergmann (via logerrit)
 external/clucene/patches/binary_function.patch |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit 39927fa6a9744b89b8ddf3abed0fd905510a9675
Author: Stephan Bergmann 
AuthorDate: Mon Jul 17 17:11:37 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jul 17 23:21:02 2023 +0200

external/clucene: More uses of obsolete std::binary_function

...as seen at least when building against VS 2022 Preview 17.7.0 Preview 
3.0 and
--with-latest-c++,

> workdir\UnpackedTarball\clucene\src\core\CLucene/util/_Arrays.h(128): 
error C2039: 'binary_function': is not a member of 'std'
> 
C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1437~1.328\Include\vector(26): 
note: see declaration of 'std'
> workdir\UnpackedTarball\clucene\src\core\CLucene/util/_Arrays.h(153): 
note: see reference to class template instantiation 
'lucene::util::CLListEquals<_kt,_comparator,class1,class2>' being compiled

etc.

Change-Id: Icea14fe0c0ad85501367ac6c81a3b8aada595383
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154551
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/patches/binary_function.patch 
b/external/clucene/patches/binary_function.patch
index 5b6f8ece9bee..a7e4b867d0c7 100644
--- a/external/clucene/patches/binary_function.patch
+++ b/external/clucene/patches/binary_function.patch
@@ -1,3 +1,26 @@
+--- src/core/CLucene/search/BooleanQuery.cpp
 src/core/CLucene/search/BooleanQuery.cpp
+@@ -25,7 +25,7 @@
+ CL_NS_USE(util)
+ CL_NS_DEF(search)
+ 
+-  class BooleanClause_Compare:public CL_NS_STD(binary_function)
++  class BooleanClause_Compare
+   {
+   public:
+   bool operator()( const BooleanClause* val1, const 
BooleanClause* val2 ) const {
+--- src/core/CLucene/util/_Arrays.h
 src/core/CLucene/util/_Arrays.h
+@@ -124,8 +124,7 @@
+   
+   template 
+-  class CLListEquals:
+-  public CL_NS_STD(binary_function)
++  class CLListEquals
+   {
+   typedef typename class1::const_iterator _itr1;
+   typedef typename class2::const_iterator _itr2;
 --- src/core/CLucene/util/Equators.h
 +++ src/core/CLucene/util/Equators.h
 @@ -22,19 +22,19 @@


[Libreoffice-commits] core.git: external/clucene

2021-11-09 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk|1 
 external/clucene/patches/binary_function.patch |   34 +
 2 files changed, 35 insertions(+)

New commits:
commit becbabbb785545af6a1799f5ecd445785534d478
Author: Stephan Bergmann 
AuthorDate: Tue Nov 9 09:06:47 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 9 10:23:54 2021 +0100

external/clucene: Remove unnecessary uses of obsolete std::binary_function

...which has been removed from C++17.  libc++ and libstdc++ still silently
support it, but MSVC needs an explicit -D_HAS_AUTO_PTR_ETC, and this change 
is a
prerequisite to drop that global define again from
solenv/gbuild/platform/com_MSC_defs.mk (it had been added there with
61c88ae6945c241f5f2aeb844eeca0776b487132 "gbuild: always compile as C++17 
with
MSVC 2017", but code including external/clucene, like
helpcompiler/source/LuceneHelper.cxx, appears to be the only code relying on
that global define)

Change-Id: I512d56f833c516dba3874cb0b4ef5190a88d3faf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124900
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index b215d1a8206a..c3928d335c57 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -53,6 +53,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/c++20.patch \
external/clucene/patches/write-strings.patch \
external/clucene/patches/nullstring.patch \
+   external/clucene/patches/binary_function.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/binary_function.patch 
b/external/clucene/patches/binary_function.patch
new file mode 100644
index ..5b6f8ece9bee
--- /dev/null
+++ b/external/clucene/patches/binary_function.patch
@@ -0,0 +1,34 @@
+--- src/core/CLucene/util/Equators.h
 src/core/CLucene/util/Equators.h
+@@ -22,19 +22,19 @@
+ /** @internal */
+ class CLUCENE_INLINE_EXPORT Equals{
+ public:
+-  class CLUCENE_INLINE_EXPORT Int32:public 
CL_NS_STD(binary_function)
++  class CLUCENE_INLINE_EXPORT Int32
+   {
+   public:
+   bool operator()( const int32_t val1, const int32_t val2 ) const;
+   };
+   
+-  class CLUCENE_INLINE_EXPORT Char:public 
CL_NS_STD(binary_function)
++  class CLUCENE_INLINE_EXPORT Char
+   {
+   public:
+   bool operator()( const char* val1, const char* val2 ) const;
+   };
+ #ifdef _UCS2
+-  class CLUCENE_INLINE_EXPORT WChar: public 
CL_NS_STD(binary_function)
++  class CLUCENE_INLINE_EXPORT WChar
+   {
+   public:
+   bool operator()( const wchar_t* val1, const wchar_t* val2 ) 
const;
+@@ -48,7 +48,7 @@
+ 
+ 
+ template
+-  class CLUCENE_INLINE_EXPORT Void:public 
CL_NS_STD(binary_function)
++  class CLUCENE_INLINE_EXPORT Void
+   {
+   public:
+   bool operator()( _cl* val1, _cl* val2 ) const{


[Libreoffice-commits] core.git: external/clucene

2021-08-20 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit af686402107a54f141eea3bb7706e3ff665178ae
Author: Stephan Bergmann 
AuthorDate: Fri Aug 20 08:54:21 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 20 10:49:56 2021 +0200

Mark external/clucene/patches/nullstring.patch as sent upstream

Change-Id: Id9e0010575110ef6fae5cf93943bb226a7727e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120770
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index a8e697784f9b..b215d1a8206a 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -34,6 +34,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 #  
 # c++20.patch was proposed upstream, see
 #  
+# nullstring.patch was proposed upstream, see
+#  
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \


[Libreoffice-commits] core.git: external/clucene

2021-08-19 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |1 +
 external/clucene/patches/nullstring.patch   |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 396c0575b2935aeb039e8da260eba739d1a0ed3c
Author: Stephan Bergmann 
AuthorDate: Thu Aug 19 16:43:59 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 19 21:03:45 2021 +0200

external/clucene: Avoid std::string(nullptr) construction

The relevant constructor is defined as deleted since incorporating
 "A
Proposal to Prohibit std::basic_string and std::basic_string_view 
construction
from nullptr" into the upcoming C++23, and has caused undefined behavior in
prior versions (see the referenced document for details).  That caused

> 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/SegmentInfos.cpp:361:13: 
error: conversion function from 'long' to 'std::string' (aka 
'basic_string, allocator>') invokes a deleted 
function
>return NULL;
>   ^~~~
> ~/llvm/inst/lib/clang/14.0.0/include/stddef.h:84:18: note: expanded from 
macro 'NULL'
> #define NULL __null
>  ^~
> ~/llvm/inst/bin/../include/c++/v1/string:849:5: note: 'basic_string' has 
been explicitly marked deleted here
> basic_string(nullptr_t) = delete;
> ^

at least when building --with-latest-c++ against recent libc++ 14 trunk (on
macOS).

(There might be a chance that the CLucene code naively relied on
SegmentInfo::getDelFileName actually returning a std::string for which 
c_str()
would return null at least at some of the call sites, which I did not 
inspect in
detail.  However, this would unlikely have worked in the past anyway, as it 
is
undefined behavior and at least contemporary libstdc++ throws a 
std::logic_error
when constructing a std::string from null, and at least a full `make check` 
with
this fix applied built fine for me.)

Change-Id: I2b8cf96b089848d666ec37aa7ee0deacc4798d35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120745
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 37c1c16dab0f..a8e697784f9b 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/heap-buffer-overflow.patch \
external/clucene/patches/c++20.patch \
external/clucene/patches/write-strings.patch \
+   external/clucene/patches/nullstring.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/nullstring.patch 
b/external/clucene/patches/nullstring.patch
new file mode 100644
index ..6043e9f00890
--- /dev/null
+++ b/external/clucene/patches/nullstring.patch
@@ -0,0 +1,11 @@
+--- src/core/CLucene/index/SegmentInfos.cpp
 src/core/CLucene/index/SegmentInfos.cpp
+@@ -358,7 +358,7 @@
+  if (delGen == NO) {
+  // In this case we know there is no deletion filename
+  // against this segment
+- return NULL;
++ return {};
+  } else {
+  // If delGen is CHECK_DIR, it's the pre-lockless-commit file 
format
+  return IndexFileNames::fileNameFromGeneration(name.c_str(), 
(string(".") + IndexFileNames::DELETES_EXTENSION).c_str(), delGen);


[Libreoffice-commits] core.git: external/clucene

2021-01-06 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk  |1 +
 external/clucene/patches/write-strings.patch |   22 ++
 2 files changed, 23 insertions(+)

New commits:
commit 101fa3fc1e03f82c864069338956a26dd85de219
Author: Stephan Bergmann 
AuthorDate: Wed Jan 6 10:28:53 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Jan 6 12:56:58 2021 +0100

external/clucene: Fix MSVC /Zc:strictStrings

...which is apparently enabled at least in MSVC 2019 16.8.3 when building 
with
--with-latest-c++ (i.e., /std:c++latest):

> 
C:/lo/core/workdir/UnpackedTarball/clucene/src/contribs-lib/CLucene/analysis/PorterStemmer.cpp(124):
 error C2664: 'bool lucene::analysis::PorterStemmer::ends(TCHAR *)': cannot 
convert argument 1 from 'const wchar_t [5]' to 'TCHAR *'
> 
C:/lo/core/workdir/UnpackedTarball/clucene/src/contribs-lib/CLucene/analysis/PorterStemmer.cpp(124):
 note: Conversion from string literal loses const qualifier (see 
/Zc:strictStrings)
> 
C:/lo/core/workdir/UnpackedTarball/clucene/src/contribs-lib/CLucene/analysis/PorterStemmer.cpp(97):
 note: see declaration of 'lucene::analysis::PorterStemmer::ends'

etc. (and which is not silenced by gb_Library_set_warnings_disabled in
external/clucene/Library_clucene.mk, unlike the corresponding Clang/GCC
-Wwrite-strings)

Change-Id: Id3c8eefa4658bf942de6c8ae9b219212eba79995
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108840
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 0aded2ceedd6..37c1c16dab0f 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/ostream-wchar_t.patch \
external/clucene/patches/heap-buffer-overflow.patch \
external/clucene/patches/c++20.patch \
+   external/clucene/patches/write-strings.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/write-strings.patch 
b/external/clucene/patches/write-strings.patch
new file mode 100644
index ..d1661ee727d1
--- /dev/null
+++ b/external/clucene/patches/write-strings.patch
@@ -0,0 +1,22 @@
+--- src/contribs-lib/CLucene/analysis/PorterStemmer.cpp
 src/contribs-lib/CLucene/analysis/PorterStemmer.cpp
+@@ -94,7 +94,7 @@
+ return true;
+   }
+ 
+-  bool PorterStemmer::ends(TCHAR *s) {
++  bool PorterStemmer::ends(const TCHAR *s) {
+   size_t l = _tcslen(s);
+ size_t o = k-l+1;
+ if (o < k0)
+--- src/contribs-lib/CLucene/analysis/PorterStemmer.h
 src/contribs-lib/CLucene/analysis/PorterStemmer.h
+@@ -68,7 +68,7 @@
+   */
+bool cvc(size_t i);
+ 
+-  bool ends(TCHAR *s);
++  bool ends(const TCHAR *s);
+ 
+   /* setto(s) sets (j+1),...k to the characters in the string s, readjusting
+  k. */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2020-06-18 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a60a5e769a407fa13b087a23ceff5a96bc03
Author: Stephan Bergmann 
AuthorDate: Thu Jun 18 10:37:17 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 18 12:27:42 2020 +0200

Mark external/clucene/patches/c++20.patch as sent upstream

Change-Id: Iaa3e251648afaa4bd3178dcff99594ce609083eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96591
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 1a373b48b49e..0aded2ceedd6 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -32,6 +32,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 #  
 # heap-buffer-overflow.patch was proposed upstream, see
 #  
+# c++20.patch was proposed upstream, see
+#  
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2020-06-17 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |1 +
 external/clucene/patches/c++20.patch|   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 5558256e777b00ac38f455081425fc5b1ee53375
Author: Stephan Bergmann 
AuthorDate: Wed Jun 17 17:34:39 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 17 19:51:38 2020 +0200

external/clucene: Adapt to C++20 CWG2237

... "Can 
a
template-id name a constructor?", as implemented by GCC 11 trunk since
 "c++: C++20 DR 2237, disallow
simple-template-id in cdtor."

Change-Id: I507fc5bde20fdf09b4e31a3db8a7554a473f1a9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96549
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 1dc64a78faa3..1a373b48b49e 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\

external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch \
external/clucene/patches/ostream-wchar_t.patch \
external/clucene/patches/heap-buffer-overflow.patch \
+   external/clucene/patches/c++20.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/c++20.patch 
b/external/clucene/patches/c++20.patch
new file mode 100644
index ..c982e861e1b4
--- /dev/null
+++ b/external/clucene/patches/c++20.patch
@@ -0,0 +1,11 @@
+--- src/core/CLucene/util/_bufferedstream.h
 src/core/CLucene/util/_bufferedstream.h
+@@ -68,7 +68,7 @@
+ void setMinBufSize(int32_t s) {
+ buffer.makeSpace(s);
+ }
+-BufferedStreamImpl();
++BufferedStreamImpl();
+ public:
+ int32_t read(const T*& start, int32_t min, int32_t max);
+ int64_t reset(int64_t pos);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2020-04-24 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 6a9c7409ee617b79c327dd7ea4de432f448b6006
Author: Stephan Bergmann 
AuthorDate: Fri Apr 24 10:38:38 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 24 12:41:05 2020 +0200

Mark external/clucene/patches/heap-buffer-overflow.patch as sent upstream

Change-Id: Idb60ae8a2389197bcfe8b1c7848c08f551702c93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92839
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index cb6efabd1d5d..1dc64a78faa3 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -30,6 +30,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 # 
https://connect.microsoft.com/VisualStudio/feedback/details/1424082/vs2015-rc-c-compiler-mixes-up-template-parameter-with-identical-named-inherited-typedef
 # ostream-wchar_t.patch was proposed upstream, see
 #  
+# heap-buffer-overflow.patch was proposed upstream, see
+#  
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2020-04-23 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |1 +
 external/clucene/patches/heap-buffer-overflow.patch |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit 92b7e0fd668f580ca573284e8f36794c72ba62df
Author: Stephan Bergmann 
AuthorDate: Thu Apr 23 16:49:17 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Apr 23 20:36:26 2020 +0200

external/clucene: Avoid heap-buffer-overflow

...as seen during a --with-lang=ALL build with ASan on Linux:

> [XHC] nlpsolver ja
> =
> ==51396==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x6210ed00 at pc 0x7fe425640f53 bp 0x7ffd6a0cc900 sp 0x7ffd6a0cc8f8
> READ of size 4 at 0x6210ed00 thread T0
>  #0 in 
lucene::analysis::cjk::CJKTokenizer::next(lucene::analysis::Token*) at 
workdir/UnpackedTarball/clucene/src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer.cpp:70:19
>  #1 in 
lucene::index::DocumentsWriter::ThreadState::FieldData::invertField(lucene::document::Field*,
 lucene::analysis::Analyzer*, int) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/DocumentsWriterThreadState.cpp:901:32
>  #2 in 
lucene::index::DocumentsWriter::ThreadState::FieldData::processField(lucene::analysis::Analyzer*)
 at 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/DocumentsWriterThreadState.cpp:798:9
>  #3 in 
lucene::index::DocumentsWriter::ThreadState::processDocument(lucene::analysis::Analyzer*)
 at 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/DocumentsWriterThreadState.cpp:557:24
>  #4 in 
lucene::index::DocumentsWriter::updateDocument(lucene::document::Document*, 
lucene::analysis::Analyzer*, lucene::index::Term*) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/DocumentsWriter.cpp:946:16
>  #5 in 
lucene::index::DocumentsWriter::addDocument(lucene::document::Document*, 
lucene::analysis::Analyzer*) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/DocumentsWriter.cpp:930:10
>  #6 in 
lucene::index::IndexWriter::addDocument(lucene::document::Document*, 
lucene::analysis::Analyzer*) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/index/IndexWriter.cpp:681:28
>  #7 in HelpIndexer::indexDocuments() at 
helpcompiler/source/HelpIndexer.cxx:66:20
>  #8 in main at helpcompiler/source/HelpIndexer_main.cxx:79:22
> 0x6210ed00 is located 0 bytes to the right of 4096-byte region 
[0x6210dd00,0x6210ed00)
> allocated by thread T0 here:
>  #0 in realloc at 
/data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:164:3
>  #1 in lucene::util::StreamBuffer::setSize(int) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/util/_streambuffer.h:114:17
>  #2 in lucene::util::StreamBuffer::makeSpace(int) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/util/_streambuffer.h:150:5
>  #3 in lucene::util::BufferedStreamImpl::setMinBufSize(int) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/util/_bufferedstream.h:69:16
>  #4 in 
lucene::util::SimpleInputStreamReader::Internal::JStreamsBuffer::JStreamsBuffer(lucene::util::CLStream*, int) at 
workdir/UnpackedTarball/clucene/src/core/CLucene/util/Reader.cpp:375:6

Note that this is not a proper fix, which would need to properly detect
surrogate pairs split across buffer boundaries.  But for one the comment 
says
"however, gunichartables doesn't seem to classify any of the surrogates as
alpha, so they are skipped anyway", and for another the behavior until now 
was
to replace the high surrogate with soemthing that was likely garbage and 
leave
the low surrogate at the start of the next buffer (if any) alone, so leaving
both surrogates alone is likely at least no worse behavior.

Change-Id: Ib6f6f1bc20ef8efe0418bf2e715783c8555068de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92792
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index a4036d72c0bc..cb6efabd1d5d 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-asan.patch \

external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch \
external/clucene/patches/ostream-wchar_t.patch \
+   external/clucene/patches/heap-buffer-overflow.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/heap-buffer-overflow.patch 
b/external/clucene/patches/heap-buffer-overflow.patch
new file mode 100644
index ..7421db854cfd
--- /dev/null
+++ b/external/clucene/patches/heap-buffer-overflow.patch
@@ -0,0 +1,11 @@
+--- src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer.cpp
 src/contribs-lib/CLucene/analysis/cjk/CJKAnalyzer

[Libreoffice-commits] core.git: external/clucene

2020-04-22 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8a2b4f9ab6e1731b4acc9cf87d3710ca4dbdfa7e
Author: Stephan Bergmann 
AuthorDate: Wed Apr 22 17:48:31 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 22 22:15:13 2020 +0200

Mark external/clucene/patches/ostream-wchar_t.patch as sent upstream

Change-Id: I96785db3e7b94b55b3ab3ae911e5fb3058c6502b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92718
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 5303d4d1c036..a4036d72c0bc 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -28,6 +28,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 #  http://sourceforge.net/mailarchive/message.php?msg_id=32367781
 # see msvc14.0 error report on:
 # 
https://connect.microsoft.com/VisualStudio/feedback/details/1424082/vs2015-rc-c-compiler-mixes-up-template-parameter-with-identical-named-inherited-typedef
+# ostream-wchar_t.patch was proposed upstream, see
+#  
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2020-04-22 Thread Stephan Bergmann (via logerrit)
 external/clucene/README |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee4a54642ddb622193ea5c64c83dc036dff691df
Author: Stephan Bergmann 
AuthorDate: Wed Apr 22 17:11:49 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Apr 22 22:03:44 2020 +0200

Add what looks like a plausible upstream URL to external/clucene/README

(which looks plausible esp. given the matching mentions of
 in
external/clucene/UnpackedTarball_clucene.mk)

Change-Id: I21234a2dd611a561c9eb9c03880ee6d673694be5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92712
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/README b/external/clucene/README
index 458762a6dfe0..bedae920f54b 100644
--- a/external/clucene/README
+++ b/external/clucene/README
@@ -1,4 +1,4 @@
-External package containing clucene.
+External package containing clucene from [http://clucene.sourceforge.net/].
 
 This is used to index our downloadable help packages, and allow them
 to be searched efficiently at run-time.
\ No newline at end of file
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2019-12-03 Thread Stephan Bergmann (via logerrit)
 external/clucene/UnpackedTarball_clucene.mk|1 
 external/clucene/patches/ostream-wchar_t.patch |   29 +
 2 files changed, 30 insertions(+)

New commits:
commit 48f845dace0aa7a607914db9febdaf73073ea607
Author: Stephan Bergmann 
AuthorDate: Tue Dec 3 11:44:04 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Dec 3 16:06:05 2019 +0100

external/clucene: Adapt to C++20 deleted ostream << for non-plain char types

 
"char8_t
backward compatibility remediation", as implemented now by 
 
"libstdc++:
P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << 
overloads
that would print a pointer rather than a (presumably expected) string.

So this infoStream output appears to have always been broken (the strings 
use
TCHAR, which appears to unconditionally be a typedef for wchar_t, see
workdir/UnpackedTarball/clucene/src/shared/CLucene/clucene-config.h), and
appears to be just of informative nature, so just simplify it to not try to
print any problematic parts.

Change-Id: Ie9f8edb03aff461a15718a0c025af57004aba0a9
Reviewed-on: https://gerrit.libreoffice.org/84320
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index a878947b0871..5303d4d1c036 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-mutex.patch \
external/clucene/patches/clucene-asan.patch \

external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch \
+   external/clucene/patches/ostream-wchar_t.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/ostream-wchar_t.patch 
b/external/clucene/patches/ostream-wchar_t.patch
new file mode 100644
index ..63c9e148144e
--- /dev/null
+++ b/external/clucene/patches/ostream-wchar_t.patch
@@ -0,0 +1,29 @@
+--- src/core/CLucene/index/DocumentsWriterThreadState.cpp
 src/core/CLucene/index/DocumentsWriterThreadState.cpp
+@@ -484,7 +484,7 @@
+ last->next = fp->next;
+ 
+   if (_parent->infoStream != NULL)
+-(*_parent->infoStream) << "  remove field=" << fp->fieldInfo->name << 
"\n";
++(*_parent->infoStream) << "  remove field\n";
+ 
+   _CLDELETE(fp);
+ } else {
+@@ -557,7 +557,7 @@
+ fieldDataArray[i]->processField(analyzer);
+ 
+   if (maxTermPrefix != NULL && _parent->infoStream != NULL)
+-(*_parent->infoStream) << "WARNING: document contains at least one 
immense term (longer than the max length " << MAX_TERM_LENGTH << "), all of 
which were skipped.  Please correct the analyzer to not produce such terms.  
The prefix of the first immense term is: '" << maxTermPrefix << "...'\n";
++(*_parent->infoStream) << "WARNING: document contains at least one 
immense term (longer than the max length " << MAX_TERM_LENGTH << "), all of 
which were skipped.  Please correct the analyzer to not produce such terms.\n";
+ 
+   if (_parent->ramBufferSize != IndexWriter::DISABLE_AUTO_FLUSH
+   && _parent->numBytesUsed > 0.95 * _parent->ramBufferSize)
+@@ -910,7 +910,7 @@
+   // truncate the token stream after 
maxFieldLength tokens.
+   if ( length >= maxFieldLength) {
+ if (_parent->infoStream != NULL)
+-  (*_parent->infoStream) << "maxFieldLength "  << 
maxFieldLength << " reached for field " << fieldInfo->name << ", ignoring 
following tokens\n";
++  (*_parent->infoStream) << "maxFieldLength "  << 
maxFieldLength << " reached for field, ignoring following tokens\n";
+   break;
+   }
+   } else if (length > 
IndexWriter::DEFAULT_MAX_FIELD_LENGTH) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: external/clucene external/epoxy external/pdfium external/redland

2017-11-02 Thread Stephan Bergmann
 external/clucene/Library_clucene.mk |8 
 external/epoxy/Library_epoxy.mk |4 ++--
 external/pdfium/Library_pdfium.mk   |8 
 external/redland/Library_rasqal.mk  |6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit fff7097f1ed8493de099d79aa0613ea6b309100a
Author: Stephan Bergmann 
Date:   Thu Nov 2 13:07:34 2017 +0100

Use gb_UnpackedTarball_get_dir

Change-Id: I931f0d95cad0a63d344c84d89ba7c80f14be8ec9

diff --git a/external/clucene/Library_clucene.mk 
b/external/clucene/Library_clucene.mk
index 763bcd7d0892..e0f04b6e2894 100644
--- a/external/clucene/Library_clucene.mk
+++ b/external/clucene/Library_clucene.mk
@@ -16,10 +16,10 @@ $(eval $(call gb_Library_use_unpacked,clucene,clucene))
 $(eval $(call gb_Library_set_warnings_not_errors,clucene))
 
 $(eval $(call gb_Library_set_include,clucene,\
-   -I$(WORKDIR)/UnpackedTarball/clucene/inc/internal \
-   -I$(WORKDIR)/UnpackedTarball/clucene/src/core \
-   -I$(WORKDIR)/UnpackedTarball/clucene/src/contribs-lib \
-   -I$(WORKDIR)/UnpackedTarball/clucene/src/shared \
+   -I$(call gb_UnpackedTarball_get_dir,clucene)/inc/internal \
+   -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
+   -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
+   -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
$$(INCLUDE) \
 ))
 
diff --git a/external/epoxy/Library_epoxy.mk b/external/epoxy/Library_epoxy.mk
index 1b1d28b68d79..d27d8deec920 100644
--- a/external/epoxy/Library_epoxy.mk
+++ b/external/epoxy/Library_epoxy.mk
@@ -14,8 +14,8 @@ $(eval $(call gb_Library_use_unpacked,epoxy,epoxy))
 $(eval $(call gb_Library_set_warnings_not_errors,epoxy))
 
 $(eval $(call gb_Library_set_include,epoxy,\
-   -I$(WORKDIR)/UnpackedTarball/epoxy/include \
-   -I$(WORKDIR)/UnpackedTarball/epoxy/src \
+   -I$(call gb_UnpackedTarball_get_dir,epoxy)/include \
+   -I$(call gb_UnpackedTarball_get_dir,epoxy)/src \
$$(INCLUDE) \
 ))
 
diff --git a/external/pdfium/Library_pdfium.mk 
b/external/pdfium/Library_pdfium.mk
index 5ae29a937344..9bc2d67b400f 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -14,8 +14,8 @@ $(eval $(call gb_Library_use_unpacked,pdfium,pdfium))
 $(eval $(call gb_Library_set_warnings_not_errors,pdfium))
 
 $(eval $(call gb_Library_set_include,pdfium,\
--I$(WORKDIR)/UnpackedTarball/pdfium \
--I$(WORKDIR)/UnpackedTarball/pdfium/third_party \
+-I$(call gb_UnpackedTarball_get_dir,pdfium) \
+-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party \
 $$(INCLUDE) \
 ))
 
@@ -554,8 +554,8 @@ $(eval $(call gb_Library_add_defs,pdfium,\
 
 else
 $(eval $(call gb_Library_set_include,pdfium,\
--I$(WORKDIR)/UnpackedTarball/pdfium/third_party/freetype/include/ \
--I$(WORKDIR)/UnpackedTarball/pdfium/third_party/freetype/src/include/ \
+-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/freetype/include/ \
+-I$(call 
gb_UnpackedTarball_get_dir,pdfium)/third_party/freetype/src/include/ \
 $$(INCLUDE) \
 ))
 
diff --git a/external/redland/Library_rasqal.mk 
b/external/redland/Library_rasqal.mk
index 58f6db1e6a27..a62a5491b721 100644
--- a/external/redland/Library_rasqal.mk
+++ b/external/redland/Library_rasqal.mk
@@ -29,9 +29,9 @@ $(eval $(call gb_Library_add_defs,rasqal,\
 ))
 
 $(eval $(call gb_Library_set_include,rasqal,\
-   -I$(WORKDIR)/UnpackedTarball/rasqal/libmtwist \
-   -I$(WORKDIR)/UnpackedTarball/rasqal/libsv \
-   -I$(WORKDIR)/UnpackedTarball/rasqal/src \
+   -I$(call gb_UnpackedTarball_get_dir,rasqal)/libmtwist \
+   -I$(call gb_UnpackedTarball_get_dir,rasqal)/libsv \
+   -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
$$(INCLUDE) \
 ))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2016-01-19 Thread Stephan Bergmann
 external/clucene/patches/clucene-warnings.patch |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f71a0b44e634ca3ca61ac15e4cd62b0db1354ae6
Author: Stephan Bergmann 
Date:   Tue Jan 19 12:24:04 2016 +0100

Silence -Werror,-Wunknown-pragmas

Change-Id: If726008f6755db59b01784ad6b479bbfe2d23e96

diff --git a/external/clucene/patches/clucene-warnings.patch 
b/external/clucene/patches/clucene-warnings.patch
index 49cc0d4..270451d 100644
--- a/external/clucene/patches/clucene-warnings.patch
+++ b/external/clucene/patches/clucene-warnings.patch
@@ -69,7 +69,7 @@
  #endif
 --- src/core/CLucene/util/Array.h  2012-02-22 12:37:22.510637696 +
 +++ src/core/CLucene/util/Array.h  2012-02-22 12:38:33.71884 +
-@@ -7,6 +7,13 @@
+@@ -7,6 +7,14 @@
  #ifndef _lucene_util_Array_
  #define _lucene_util_Array_
  
@@ -77,6 +77,7 @@
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +# pragma GCC diagnostic ignored "-Wunused-parameter"
++# pragma GCC diagnostic ignored "-Wpragmas"
 +# pragma GCC diagnostic ignored "-Wmisleading-indentation"
 +#endif
 +
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2016-01-19 Thread Stephan Bergmann
 external/clucene/patches/clucene-warnings.patch |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ae4139e220201fe40f034e054849634786f1afd9
Author: Stephan Bergmann 
Date:   Tue Jan 19 11:47:18 2016 +0100

external/clucene: Silence -Werror=misleading-indentation (GCC 6)

Change-Id: I9a067605f7c477f4e057338577a437cda7f2aa3d

diff --git a/external/clucene/patches/clucene-warnings.patch 
b/external/clucene/patches/clucene-warnings.patch
index fc3e322..49cc0d4 100644
--- a/external/clucene/patches/clucene-warnings.patch
+++ b/external/clucene/patches/clucene-warnings.patch
@@ -69,7 +69,7 @@
  #endif
 --- src/core/CLucene/util/Array.h  2012-02-22 12:37:22.510637696 +
 +++ src/core/CLucene/util/Array.h  2012-02-22 12:38:33.71884 +
-@@ -7,6 +7,12 @@
+@@ -7,6 +7,13 @@
  #ifndef _lucene_util_Array_
  #define _lucene_util_Array_
  
@@ -77,6 +77,7 @@
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
 +# pragma GCC diagnostic ignored "-Wunused-parameter"
++# pragma GCC diagnostic ignored "-Wmisleading-indentation"
 +#endif
 +
  #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2015-11-18 Thread Stephan Bergmann
 external/clucene/patches/clucene-warnings.patch |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 0a779d1dc3e08a9f5407f96b98d7fffa3e789a79
Author: Stephan Bergmann 
Date:   Wed Nov 18 15:05:11 2015 +0100

No more need to include config_global.h

...after 3b59dbbffdb73e48f9e2398bb1eecc24e3d95e13 "remove
HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE check and macro"

Change-Id: I0e9f3c15d48affe104dd6b5df9828ef5e62dfa88

diff --git a/external/clucene/patches/clucene-warnings.patch 
b/external/clucene/patches/clucene-warnings.patch
index dc20d19..981215f 100644
--- a/external/clucene/patches/clucene-warnings.patch
+++ b/external/clucene/patches/clucene-warnings.patch
@@ -1,10 +1,9 @@
 --- src/core/CLucene/analysis/AnalysisHeader.h 2012-02-22 12:37:22.531637934 
+
 +++ src/core/CLucene/analysis/AnalysisHeader.h 2012-02-22 12:39:15.369916728 
+
-@@ -7,6 +7,12 @@
+@@ -7,6 +7,11 @@
  #ifndef _lucene_analysis_AnalysisHeader_
  #define _lucene_analysis_AnalysisHeader_
  
-+#include 
 +#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Woverloaded-virtual"
@@ -24,11 +23,10 @@
  #endif
 --- src/core/CLucene/search/Searchable.h   2012-02-22 12:37:22.513637729 
+
 +++ src/core/CLucene/search/Searchable.h   2012-02-22 12:38:51.073641550 
+
-@@ -7,6 +7,12 @@
+@@ -7,6 +7,11 @@
  #ifndef _lucene_search_Searcher_
  #define _lucene_search_Searcher_
  
-+#include 
 +#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Woverloaded-virtual"
@@ -48,11 +46,10 @@
  #endif
 --- src/core/CLucene/store/IndexInput.h2012-02-22 12:37:22.508637673 
+
 +++ src/core/CLucene/store/IndexInput.h2012-02-22 12:39:00.465747935 
+
-@@ -7,6 +7,12 @@
+@@ -7,6 +7,11 @@
  #ifndef _lucene_store_IndexInput_
  #define _lucene_store_IndexInput_
  
-+#include 
 +#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Woverloaded-virtual"
@@ -72,11 +69,10 @@
  #endif
 --- src/core/CLucene/util/Array.h  2012-02-22 12:37:22.510637696 +
 +++ src/core/CLucene/util/Array.h  2012-02-22 12:38:33.71884 +
-@@ -7,6 +7,13 @@
+@@ -7,6 +7,12 @@
  #ifndef _lucene_util_Array_
  #define _lucene_util_Array_
  
-+#include 
 +#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
@@ -97,11 +93,10 @@
  #endif
 --- src/core/CLucene/util/PriorityQueue.h  2012-02-22 12:37:22.510637696 
+
 +++ src/core/CLucene/util/PriorityQueue.h  2012-02-22 12:38:40.316519685 
+
-@@ -7,6 +7,12 @@
+@@ -7,6 +7,11 @@
  #ifndef _lucene_util_PriorityQueue_
  #define _lucene_util_PriorityQueue_
  
-+#include 
 +#if defined(__GNUC__)
 +# pragma GCC diagnostic push
 +# pragma GCC diagnostic ignored "-Wshadow"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2015-07-28 Thread David Ostrovsky
 external/clucene/UnpackedTarball_clucene.mk   |
3 
 external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch |   
53 ++
 2 files changed, 56 insertions(+)

New commits:
commit c26ebc6bd37b32808514635cf7c5f6434df7501d
Author: David Ostrovsky 
Date:   Fri Jul 24 20:38:48 2015 +0200

Fix clucene on MSVC 14.0

Change-Id: I225d9c5eb1d9c9851b3f64f7c654cfede6297933
Reviewed-on: https://gerrit.libreoffice.org/17339
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 93defa2..fa4689d 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -26,6 +26,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 #  http://sourceforge.net/mailarchive/message.php?msg_id=32314782
 # clucene-asan.patch was proposed upstream, see
 #  http://sourceforge.net/mailarchive/message.php?msg_id=32367781
+# see msvc14.0 error report on:
+# 
https://connect.microsoft.com/VisualStudio/feedback/details/1424082/vs2015-rc-c-compiler-mixes-up-template-parameter-with-identical-named-inherited-typedef
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \
@@ -37,6 +39,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-ub.patch \
external/clucene/patches/clucene-mutex.patch \
external/clucene/patches/clucene-asan.patch \
+   
external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git 
a/external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch 
b/external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch
new file mode 100644
index 000..0c9cd0a
--- /dev/null
+++ b/external/clucene/patches/clucene-mixes-uptemplate-parameter-msvc-14.patch
@@ -0,0 +1,53 @@
+diff -ru clucene.org/src/core/CLucene/util/VoidMap.h 
clucene/src/core/CLucene/util/VoidMap.h
+--- src/core/CLucene/util/VoidMap.h2015-07-24 20:11:28.892997236 +0200
 src/core/CLucene/util/VoidMap.h2015-07-24 20:21:17.290990623 +0200
+@@ -154,16 +154,16 @@
+ 
+  //a CLSet with CLHashMap traits
+ template
+ class CLUCENE_INLINE_EXPORT CLHashMap:public __CLMap<_kt,_vt,
+-  CL_NS_STD(map)<_kt,_vt, _Compare>,
++  CL_NS_STD(map)<_kt,_vt, Compare>,
+   _KeyDeletor,_ValueDeletor>
+ {
+-  typedef typename CL_NS_STD(map)<_kt,_vt,_Compare> _base;
+-  typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, _Compare>,
++  typedef typename CL_NS_STD(map)<_kt,_vt,Compare> _base;
++  typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, Compare>,
+   _KeyDeletor,_ValueDeletor> _this;
+ public:
+   CLHashMap ( const bool deleteKey=false, const bool deleteValue=false )
+@@ -260,15 +260,15 @@
+ //A collection that contains no duplicates
+ //does not guarantee that the order will remain constant over time
+ template
+ class CLUCENE_INLINE_EXPORT CLSet:public __CLMap<_kt,_vt,
+-  CL_NS_STD(map)<_kt,_vt, _Compare>,
++  CL_NS_STD(map)<_kt,_vt, Compare>,
+   _KeyDeletor,_ValueDeletor>
+ {
+-  typedef typename CL_NS_STD(map)<_kt,_vt,_Compare> _base;
+-  typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, _Compare>,
++  typedef typename CL_NS_STD(map)<_kt,_vt,Compare> _base;
++  typedef __CLMap<_kt, _vt, CL_NS_STD(map)<_kt,_vt, Compare>,
+   _KeyDeletor,_ValueDeletor> _this;
+ public:
+   CLSet ( const bool deleteKey=false, const bool deleteValue=false )
+@@ -294,7 +294,7 @@
+ 
+ //A collection that can contains duplicates
+ template
+ class CLUCENE_INLINE_EXPORT CLMultiMap:public __CLMap<_kt,_vt,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2014-05-22 Thread Stephan Bergmann
 external/clucene/UnpackedTarball_clucene.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c1db9194a53f3da7688db3463309f65659e8
Author: Stephan Bergmann 
Date:   Thu May 22 10:28:05 2014 +0200

Record patch upstream notification

Change-Id: I102160cb6fac41f5ba3caa5cb947aebbcd62681f

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index d059241..93defa2 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -24,6 +24,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 #  http://sourceforge.net/mailarchive/message.php?msg_id=29143260
 # clucene-mutex.patch was proposed upstream, see
 #  http://sourceforge.net/mailarchive/message.php?msg_id=32314782
+# clucene-asan.patch was proposed upstream, see
+#  http://sourceforge.net/mailarchive/message.php?msg_id=32367781
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2014-05-21 Thread Stephan Bergmann
 external/clucene/UnpackedTarball_clucene.mk |1 +
 external/clucene/patches/clucene-asan.patch |   26 ++
 2 files changed, 27 insertions(+)

New commits:
commit c01904f91f76b771362ab9fb71289feba1e342f6
Author: Stephan Bergmann 
Date:   Wed May 21 21:26:36 2014 +0200

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

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index efa7747..d059241 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-git1-win64.patch \
external/clucene/patches/clucene-ub.patch \
external/clucene/patches/clucene-mutex.patch \
+   external/clucene/patches/clucene-asan.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/clucene-asan.patch 
b/external/clucene/patches/clucene-asan.patch
new file mode 100644
index 000..51adfad
--- /dev/null
+++ b/external/clucene/patches/clucene-asan.patch
@@ -0,0 +1,26 @@
+--- 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
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2014-05-08 Thread Stephan Bergmann
 external/clucene/UnpackedTarball_clucene.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit adef90807391c039408d40e283e38eaae77f0fee
Author: Stephan Bergmann 
Date:   Thu May 8 11:54:06 2014 +0200

Record patch upstream notification

Change-Id: I210b995d4a8eb3e2f00ba982f7a6cf5ecd8e6f0d

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 4407f73..efa7747 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -21,7 +21,9 @@ endif
 $(eval $(call gb_UnpackedTarball_set_patchlevel,clucene,0))
 
 # clucene-multimap-put.patch was proposed upstream, see
-# http://sourceforge.net/mailarchive/message.php?msg_id=29143260
+#  http://sourceforge.net/mailarchive/message.php?msg_id=29143260
+# clucene-mutex.patch was proposed upstream, see
+#  http://sourceforge.net/mailarchive/message.php?msg_id=32314782
 $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-debug.patch \
external/clucene/patches/clucene-multimap-put.patch \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2014-05-08 Thread Stephan Bergmann
 external/clucene/UnpackedTarball_clucene.mk  |1 +
 external/clucene/patches/clucene-mutex.patch |   13 +
 2 files changed, 14 insertions(+)

New commits:
commit 10314b5d8b653864c92d392cbb774438633b2fe1
Author: Stephan Bergmann 
Date:   Thu May 8 11:08:51 2014 +0200

CLucene: Helgrind reported "pthread_mutex_destroy of a locked mutex"

> pthread_mutex_destroy 
(/usr/src/debug/valgrind-3.9.0/helgrind/hg_intercepts.c:478)
> lucene::util::mutex_thread::~mutex_thread() 
(workdir/UnpackedTarball/clucene/src/shared/CLucene/config/threads.cpp:179)
> lucene::store::FSDirectory::FSIndexInput::close() 
(workdir/UnpackedTarball/clucene/src/core/CLucene/store/FSDirectory.cpp:225)
> lucene::index::SegmentInfos::read(lucene::store::Directory*, char const*) 
(workdir/UnpackedTarball/clucene/src/core/CLucene/index/SegmentInfos.cpp:770)
> 
lucene::index::IndexFileDeleter::IndexFileDeleter(lucene::store::Directory*, 
lucene::index::IndexDeletionPolicy*, lucene::index::SegmentInfos*, 
std::ostream*, lucene::index::DocumentsWriter*) 
(workdir/UnpackedTarball/clucene/src/core/CLucene/index/IndexFileDeleter.cpp:149)
> lucene::index::IndexWriter::init(lucene::store::Directory*, 
lucene::analysis::Analyzer*, bool, bool, lucene::index::IndexDeletionPolicy*, 
bool) 
(workdir/UnpackedTarball/clucene/src/core/CLucene/index/IndexWriter.cpp:262)
> lucene::index::IndexWriter::IndexWriter(char const*, 
lucene::analysis::Analyzer*, bool) 
(workdir/UnpackedTarball/clucene/src/core/CLucene/index/IndexWriter.cpp:158)
> HelpIndexer::indexDocuments() (helpcompiler/source/HelpIndexer.cxx:55)

Change-Id: I19cb9bd49b339d206a624c1f1d3dacdd909f4e25

diff --git a/external/clucene/UnpackedTarball_clucene.mk 
b/external/clucene/UnpackedTarball_clucene.mk
index 5148fb7..4407f73 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,clucene,\
external/clucene/patches/clucene-aix.patch \
external/clucene/patches/clucene-git1-win64.patch \
external/clucene/patches/clucene-ub.patch \
+   external/clucene/patches/clucene-mutex.patch \
 ))
 
 ifneq ($(OS),WNT)
diff --git a/external/clucene/patches/clucene-mutex.patch 
b/external/clucene/patches/clucene-mutex.patch
new file mode 100644
index 000..2a6b7d2
--- /dev/null
+++ b/external/clucene/patches/clucene-mutex.patch
@@ -0,0 +1,13 @@
+--- src/core/CLucene/store/FSDirectory.cpp
 src/core/CLucene/store/FSDirectory.cpp
+@@ -219,9 +219,8 @@
+   _CLDECDELETE(handle);
+ 
+   //printf("handle=%d\n", handle->__cl_refcount);
+-  if ( dounlock ){
+   mutex->unlock();
+-  }else{
++  if ( !dounlock ){
+   delete mutex;
+   }
+   }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/clucene

2014-04-11 Thread Stephan Bergmann
 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 
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 000..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 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() & 0xL));
++uint64_t i = ((uint64_t)readInt() << 32);
++return (i | ((uint64_t)readInt() & 0xL));
+   }
+ 
+   int64_t IndexInput::readVLong() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits