[PATCH] D61923: [GWP-ASan] Mutex implementation [2].

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 08:32:05 PDT 2019


hctim added inline comments.


================
Comment at: compiler-rt/lib/gwp_asan/platform_specific/mutex_posix.cpp:43
+
+Mutex::Mutex() : PImpl(new Impl) {}
+Mutex::~Mutex() { delete PImpl; }
----------------
eugenis wrote:
> This is a dependency on libc++ / libstdc++.
> 
> I'm not sure about using malloc() inside mutex constructor, either.
> 
> We will probably want the mutex to be linker-initialized, too. AFAIK, gwp-asan would not have any clear initialization entry point, and would need to do this lazily in malloc, which can there be several of, concurrently.
> 
As per offline discussion, have ifdef-d the platform-specific headers into this file. Allows us to have linker initialisation (at least for POSIX).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61923





More information about the llvm-commits mailing list