[all-commits] [llvm/llvm-project] 29480c: [asan][fuchsia] set current thread before reading ...

Drew Fisher via All-commits all-commits at lists.llvm.org
Sat Oct 24 14:23:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 29480c6c746cd3eda90b7060233bdc04a3f2e3dd
      https://github.com/llvm/llvm-project/commit/29480c6c746cd3eda90b7060233bdc04a3f2e3dd
  Author: Drew Fisher <zarvox at google.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M compiler-rt/lib/asan/asan_fuchsia.cpp
    M compiler-rt/lib/asan/asan_thread.cpp

  Log Message:
  -----------
  [asan][fuchsia] set current thread before reading thread state

When enabling stack use-after-free detection, we discovered that we read
the thread ID on the main thread while it is still set to 2^24-1.

This patch moves our call to AsanThread::Init() out of CreateAsanThread,
so that we can call SetCurrentThread first on the main thread.

Reviewed By: mcgrathr

Differential Revision: https://reviews.llvm.org/D89606




More information about the All-commits mailing list