[PATCH] D60593: [GwpAsan] Introduce GWP-ASan.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 14:21:39 PDT 2019
pcc added inline comments.
================
Comment at: compiler-rt/lib/gwp_asan/mutex.h:34
+
+ std::atomic<bool> Semaphore{false};
+};
----------------
hctim wrote:
> cryptoad wrote:
> > Does using `std::atomic` bring in a libc++ (or equivalent) dependency?
> It brings in a libc++ dependency when building GWP-ASan, but no further than that (i.e. does not affect Scudo). `std::atomic<bool>` is header-only, and although we don't have any strong guarantess for this, I believe it to be a safe bet.
>
> @pcc - can you confirm that this is a safe bet?
I don't believe that the "header-only" subset of the standard library is formally defined, so in theory there could be a library dependency here but it seems unlikely. If we want a guarantee of no library dependency, we could always just use the `__atomic` builtins here like scudo is doing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60593/new/
https://reviews.llvm.org/D60593
More information about the llvm-commits
mailing list