[PATCH] D74154: LSAN for android
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 13:27:46 PST 2020
eugenis added inline comments.
================
Comment at: compiler-rt/lib/lsan/lsan_thread.cpp:47
+LsanThread* GetCurrentThread() {
+ if (!tls.init) {
+ tls.tid = kInvalidTid;
----------------
You could initialize the current thread in ThreadStart(). Is this lazy initialization necessary then?
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:483
+ uptr end_addr;
+ if (__libc_get_static_tls_bounds(reinterpret_cast<void**>(&start_addr),
+ reinterpret_cast<void**>(&end_addr))){
----------------
Use a weak declaration so that this can work even if the runtime library is built for a lower minimum API level than 30 (or 31).
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp:485
+ reinterpret_cast<void**>(&end_addr))){
+ fprintf(stderr, "Error getting TLS bounds\n");
+ *addr = 0;
----------------
Printf
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74154/new/
https://reviews.llvm.org/D74154
More information about the llvm-commits
mailing list