[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp
This allows for other implementations to define their own version of `Thread::Init`. This will be the case for Fuchsia where much of the thread initialization can be broken up between different thread hooks (`__sanitizer_before_thread_create_hook`, `__sanitizer_thread_create_hook`, `__sanitizer_thread_start_hook`). Namely, setting up the heap ring buffer and stack info and can be setup before thread creation. The stack ring buffer can also be setup before thread creation, but storing it into `__hwasan_tls` can only be done on the thread start hook since it's only then we can access `__hwasan_tls` for that thread correctly. Differential Revision: https://reviews.llvm.org/D104248
Loading
Please sign in to comment