[PATCH] D108394: add tsan shared library

Dan Albert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 2 12:57:08 PDT 2021


danalbert added inline comments.


================
Comment at: compiler-rt/lib/tsan/CMakeLists.txt:266
                                        clang_rt.tsan_cxx-${arch})
+    add_compiler_rt_runtime(clang_rt.tsan
+      SHARED
----------------
eugenis wrote:
> danalbert wrote:
> > eugenis wrote:
> > > vitalybuka wrote:
> > > > @eugenis I would say that we need to test dynamic runtime, but I noticed that we test Asan but don't hwasan and ubsan. Is there good reason for that or just overlook?
> > > We test hwasan on android, it defaults to shared runtime there. As well as all sanitizers, I believe.
> > > 
> > > Yeah, it would be good to add such testing.
> > > 
> > We're working on testing on our end as well. TSan doesn't actually work on Android currently, but I don't think that's related to it being a shared library. TSan //was// working on Android as a shared library many years ago, but it bit rot because it never got used or tested.
> > 
> > Is there support for cross-testing in compiler-rt? If so we can add some tests here as well.
> What do you mean by cross-testing? There is a mode where lit tests build on Linux host and execute on Android through the scripts in test/sanitizer_common/android_commands/. 
> 
> This should get tested automatically here:
> https://github.com/llvm/llvm-zorg/blob/main/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh#L287
> 
> On this bot:
> https://lab.llvm.org/buildbot/#/builders/77/builds/9195
> 
> Need to make sure that test/tsan has all the android bits right, though.
Yep, that's what I meant. Thanks!

To be clear: tsan on Android doesn't actually //work// currently. It used to but bit rot. We're working on it as we find each issue, but this isn't going to be the last one. We'll probably just need to disable some tests for Android, though given that they aren't currently failing, probably nothing we need to do yet?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108394/new/

https://reviews.llvm.org/D108394



More information about the llvm-commits mailing list