external/clucene/UnpackedTarball_clucene.mk | 1 + external/clucene/patches/clucene-pure-virtual.patch | 11 +++++++++++ 2 files changed, 12 insertions(+)
New commits: commit 065e9a8deea358615b0af25b61e92237eb09693f Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Sep 15 15:21:37 2023 +0300 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Sep 19 11:45:20 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 <mike.kagan...@collabora.com> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157008 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 000000000000..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