[PATCH] D137352: [scudo] Detect double free when running with MTE.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 15:41:50 PDT 2022


pcc added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:565
+    // byte with a correctly tagged pointer. Skip zero-sized allocations that do
+    // not always store the correct tag value anywhere.
     const uptr Size = getSize(Ptr, &Header);
----------------
For zero-sized allocations I'd expect the correct allocation tag to be stored in the first byte of the granule. It may be simpler to say that we skip this for zero-sized allocations because it is not expected to succeed even for valid allocations.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137352



More information about the llvm-commits mailing list