[PATCH] D72887: [lsan] Support LeakSanitizer runtime on Fuchsia
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 17:37:54 PST 2020
vitalybuka added inline comments.
================
Comment at: compiler-rt/lib/lsan/lsan.cpp:119
+#if !SANITIZER_FUCHSIA
InstallDeadlySignalHandlers(LsanOnDeadlySignal);
+#endif
----------------
LsanInstalDeadlySignalHandlers()
*_fuchsic.cpp:
LsanInstalDeadlySignalHandlers() {}
*_linux.cpp:
LsanInstalDeadlySignalHandlers() {
InstallDeadlySignalHandlers(LsanOnDeadlySignal);
}
================
Comment at: compiler-rt/lib/lsan/lsan_common.cpp:448
- // Holds the flood fill frontier.
- Frontier frontier;
-
----------------
Can you please extract CheckForLeaksParam/Frontier into separate change and explain in description why this is needed
================
Comment at: compiler-rt/lib/lsan/lsan_interceptors.cpp:66
INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) {
+#if !SANITIZER_FUCHSIA
if (lsan_init_is_running) {
----------------
this looks uncertainty
lsan_init_is_running is always false there?
================
Comment at: compiler-rt/lib/lsan/lsan_interceptors.cpp:407
+// This is called before each thread creation is attempted. So, in
+// its first call, the calling thread is the initial and sole thread.
+void *__sanitizer_before_thread_create_hook(thrd_t thread, bool detached,
----------------
thy this thread related stuff in interceptors.cpp
I think better to add lsan_thread_fuchsia.h
and put them here
also derive ThreadContextFuchsia : ThreadContext and avoid ifdefs in lsan_thread.cpp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72887/new/
https://reviews.llvm.org/D72887
More information about the llvm-commits
mailing list