[PATCH] D62872: [GWP-ASan] Core Guarded Pool Allocator [4].

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 12:05:32 PDT 2019


vlad.tsyrklevich accepted this revision.
vlad.tsyrklevich added a comment.
This revision is now accepted and ready to land.

LGTM otherwise



================
Comment at: compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp:162
+
+  if (Meta->IsDeallocated) {
+    reportError(UPtr, Error::DOUBLE_FREE);
----------------
hctim wrote:
> vlad.tsyrklevich wrote:
> > There's a race checking this and having it set it later in RecordDeallocation.
> Darn, I tried to be clever here and not hold the mutex during the expensive call to `markInaccessible`.  Instead, I clearly need to scope this, unlock for the `mprotect` and then lock the critical path again.
One thing to watch out for is that once you add unwinding you're holding the lock across the unwind call as well, which may be an issue depending on how unwinding works.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62872





More information about the llvm-commits mailing list