[PATCH] D122518: [scudo] Use template specialization on Quarantine to avoid zero-length array

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 26 01:05:12 PDT 2022


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

LGTM with suggested change



================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:365-375
+  // Template specialization to avoid producing zero-length array
+  template <size_t Size> class QuarantineBlocks {
+  public:
+    CachedBlock *get(uptr Idx) { return &Blocks[Idx]; }
+  private:
+    CachedBlock Blocks[Size];
+  };
----------------
vitalybuka wrote:
> 
UNREACHABLE("Not implemented!");


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122518



More information about the llvm-commits mailing list