[compiler-rt] [scudo] Clean up string handling (PR #86364)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 14:34:08 PDT 2024


================
@@ -35,7 +35,9 @@ template <typename T> class VectorNoCtor {
     DCHECK_LE(Size, capacity());
     if (Size == capacity()) {
       const uptr NewCapacity = roundUpPowerOfTwo(Size + 1);
-      reallocate(NewCapacity);
+      if (!reallocate(NewCapacity)) {
+        return;
+      }
----------------
cferris1000 wrote:

There aren't any other uses of Vector, which is why I left it like this. I do agree that having a fixed string is a good idea. Would you mind if I did that as a follow-up rather than change this one? I think that will be a slightly bigger change since I need to tear up the ScopedString a bit to do it right.

https://github.com/llvm/llvm-project/pull/86364


More information about the llvm-commits mailing list