[PATCH] D103641: [scudo] Rework Vector/String

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 14:01:36 PDT 2021


hctim added a comment.

> Some Trusty apps have a heap of 1 page (yup),

Wow!



================
Comment at: compiler-rt/lib/scudo/standalone/string_utils.h:22
+  explicit ScopedString(uptr InitialSize = 0) : String(InitialSize) {
     String[0] = '\0';
   }
----------------
cryptoad wrote:
> hctim wrote:
> > With `InitialSize == 0`, isn't this OOB?
> Well we always have at least the local buffer worth of space, so it won't OOB, but I see how this isn't  obvious.
> I am going to add a check.
Yeah, logical bug. But if I'm reading correctly, it should currently trip the DCHECK :).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103641



More information about the llvm-commits mailing list