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

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 13:05:04 PDT 2021


hctim added a comment.

> CanGrow templated parameter that for now is
> always true but would be set to false on Trusty.

Are we seeing OOMs on Trusty due to ScopedString? I had a quick look and it seemed like there's no non-ephemeral buffers (and really, this shouldn't be called very often at all), and it concerns me a little that `push_back` can silently fail on a ScopedErrorReport and truncate the text and it seems hard to test "all failure conditions log successfully".



================
Comment at: compiler-rt/lib/scudo/standalone/string_utils.h:22
+  explicit ScopedString(uptr InitialSize = 0) : String(InitialSize) {
     String[0] = '\0';
   }
----------------
With `InitialSize == 0`, isn't this OOB?


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