[PATCH] D108184: hwasan: Move stack ring buffer initialization before InitStackAndTls.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 10:18:44 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGaffb132ab89f: hwasan: Move stack ring buffer initialization before InitStackAndTls. (authored by pcc).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108184

Files:
  compiler-rt/lib/hwasan/hwasan_thread.cpp


Index: compiler-rt/lib/hwasan/hwasan_thread.cpp
===================================================================
--- compiler-rt/lib/hwasan/hwasan_thread.cpp
+++ compiler-rt/lib/hwasan/hwasan_thread.cpp
@@ -45,13 +45,13 @@
   if (auto sz = flags()->heap_history_size)
     heap_allocations_ = HeapAllocationsRingBuffer::New(sz);
 
-  InitStackAndTls(state);
 #if !SANITIZER_FUCHSIA
   // Do not initialize the stack ring buffer just yet on Fuchsia. Threads will
   // be initialized before we enter the thread itself, so we will instead call
   // this later.
   InitStackRingBuffer(stack_buffer_start, stack_buffer_size);
 #endif
+  InitStackAndTls(state);
 }
 
 void Thread::InitStackRingBuffer(uptr stack_buffer_start,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108184.366938.patch
Type: text/x-patch
Size: 725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210817/81d07847/attachment.bin>


More information about the llvm-commits mailing list