luceneplusplus / LucenePlusPlus

Lucene++ is an up to date C++ port of the popular Java Lucene library, a high-performance, full-featured text search engine.
luceneplusplus@googlegroups.com
Other
738 stars 232 forks source link

Multiple thread sanitizer hits when running the tests #184

Open kmatheussen opened 2 years ago

kmatheussen commented 2 years ago

A thread sanitizer hit is usually an indication that there is a serious problem. I've compiled LucenePlusPlus and the tests in debug mode. In addition, I've added the option "-fsanitize=thread" to enable the thread sanitizer.

(Adding custom flags when using cmake is usually a never ending nightmare, so this is my way of adding custom flags to a cmake project:

cd /usr/bin
mv c++ c++_org
ln -s c++tsan c++

and c++tsan looks like this:

#!/bin/sh

g++ -fsanitize=thread $@

)

Anyway, here is the output of running "./src/test/lucene++-tester 2>w.txt": w.txt