[PATCH] D62929: [GWP-ASan] Integration with Scudo [5].

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 14:09:49 PDT 2019


vlad.tsyrklevich accepted this revision.
vlad.tsyrklevich added inline comments.


================
Comment at: compiler-rt/lib/scudo/scudo_allocator.cpp:493
+#ifdef GWP_ASAN_HOOKS
+    if (UNLIKELY(GuardedAlloc.pointerIsMine(OldPtr))) {
+      size_t OldSize = GuardedAlloc.getSize(OldPtr);
----------------
Just checking, does reallocate() have the same semantics as realloc() where NewSize == 0 means free? And does allocate(0) always return nullptr in that case?


================
Comment at: compiler-rt/test/gwp_asan/invalid_free_left.cpp:3
+// RUN: %clangxx_gwp_asan %s -o %t
+// RUN: not %run %t 2>&1 | FileCheck %s
+
----------------
This uses not while the others above use %expect_crash, you probably want %expect_crash here too and in the other places you use not?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62929





More information about the llvm-commits mailing list