[compiler-rt] [scudo] Clean up string handling (PR #86364)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 12:30:48 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;
+ }
----------------
ChiaHungDuan wrote:
Just came up with another idea, we can have something like StaticVector which uses a local array and never grows the buffer. So that in an OOM situation, we don't even bother allocating a single page for error message (given the error messages are short in general)
https://github.com/llvm/llvm-project/pull/86364
More information about the llvm-commits
mailing list