aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2021-03-09 11:15:40 +0100
committerKadir Cetinkaya <kadircet@google.com>2021-03-09 11:57:05 +0100
commitd1531b08c3d1bd46829a91313e7d6eb24d04c0d0 (patch)
treeff78d628da71d9e97da27941b449aec68b88c52c /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
parentbf3a27196085e4fbfdb7095539a4d030a568aee7 (diff)
downloadllvm-d1531b08c3d1bd46829a91313e7d6eb24d04c0d0.zip
llvm-d1531b08c3d1bd46829a91313e7d6eb24d04c0d0.tar.gz
llvm-d1531b08c3d1bd46829a91313e7d6eb24d04c0d0.tar.bz2
[clangd] Move logging out of LSPTest base class into a separate one.
This was causing TSan failures due to a race on vptr during destruction, see https://lab.llvm.org/buildbot/#/builders/131/builds/6579/steps/6/logs/FAIL__Clangd_Unit_Tests__LSPTest_FeatureModulesThr. The story is, during the execution of a destructor all the virtual dispatches should resolve to implementations in the class being destroyed, not the derived ones. And LSPTests will log some stuff during destruction (we send shutdown/exit requests, which are logged), which is a virtual dispatch when LSPTest is derived from clang::clangd::Logger. It is a benign race in our case, as gtests that derive from LSPTest doesn't override the `log` method. But still during destruction, we might try to update vtable ptr (due to being done with destruction of test and starting destruction of LSPTest) and read from it to dispatch a log message at the same time. This patch fixes that race by moving `log` out of the vtable of `LSPTest`. Differential Revision: https://reviews.llvm.org/D98241
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp')
0 files changed, 0 insertions, 0 deletions