leonardchan created this revision. leonardchan added reviewers: phosek, mcgrathr, vitalybuka, eugenis. leonardchan added a project: Sanitizers. Herald added a subscriber: dberris. leonardchan requested review of this revision. Herald added a subscriber: Sanitizers.
Once D104553 <https://reviews.llvm.org/D104553> lands, `CreateCurrentThread` will be able to accept optional parameters for initializing the hwasan thread object. On fuchsia, we can get stack info in the platform-specific `InitThreads` and pass it through `CreateCurrentThread`. On linux, this is a no-op. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D104561 Files: compiler-rt/lib/hwasan/hwasan.cpp compiler-rt/lib/hwasan/hwasan_linux.cpp Index: compiler-rt/lib/hwasan/hwasan_linux.cpp =================================================================== --- compiler-rt/lib/hwasan/hwasan_linux.cpp +++ compiler-rt/lib/hwasan/hwasan_linux.cpp @@ -250,6 +250,7 @@ ProtectGap(thread_space_end, __hwasan_shadow_memory_dynamic_address - thread_space_end); InitThreadList(thread_space_start, thread_space_end - thread_space_start); + hwasanThreadList().CreateCurrentThread(); } bool MemIsApp(uptr p) { Index: compiler-rt/lib/hwasan/hwasan.cpp =================================================================== --- compiler-rt/lib/hwasan/hwasan.cpp +++ compiler-rt/lib/hwasan/hwasan.cpp @@ -276,7 +276,6 @@ } InitThreads(); - hwasanThreadList().CreateCurrentThread(); hwasan_instrumentation_inited = 1; }
Index: compiler-rt/lib/hwasan/hwasan_linux.cpp =================================================================== --- compiler-rt/lib/hwasan/hwasan_linux.cpp +++ compiler-rt/lib/hwasan/hwasan_linux.cpp @@ -250,6 +250,7 @@ ProtectGap(thread_space_end, __hwasan_shadow_memory_dynamic_address - thread_space_end); InitThreadList(thread_space_start, thread_space_end - thread_space_start); + hwasanThreadList().CreateCurrentThread(); } bool MemIsApp(uptr p) { Index: compiler-rt/lib/hwasan/hwasan.cpp =================================================================== --- compiler-rt/lib/hwasan/hwasan.cpp +++ compiler-rt/lib/hwasan/hwasan.cpp @@ -276,7 +276,6 @@ } InitThreads(); - hwasanThreadList().CreateCurrentThread(); hwasan_instrumentation_inited = 1; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits