[PATCH] D71229: [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone.

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 15:24:03 PST 2019


cryptoad added a comment.

Thanks!
What's the current plan for testing? (Currently I have only enabled the standalone on Linux x86/64 for upstream)



================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:342
+    if (UNLIKELY(GuardedAlloc.pointerIsMine(OldPtr))) {
+      size_t OldSize = GuardedAlloc.getSize(OldPtr);
+      void *NewPtr = allocate(NewSize, Chunk::Origin::Malloc, Alignment);
----------------
Since there is no other `size_t` in combined, could you use a `uptr`?


================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:498
+#ifdef GWP_ASAN_HOOKS
+    if (UNLIKELY(GuardedAlloc.pointerIsMine(Ptr)))
+      return GuardedAlloc.getSize(Ptr);
----------------
Could you also please modify `isOwned` with a GWP check?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71229





More information about the llvm-commits mailing list