Index: llvm/include/llvm/Object/Decompressor.h =================================================================== --- llvm/include/llvm/Object/Decompressor.h +++ llvm/include/llvm/Object/Decompressor.h @@ -30,7 +30,7 @@ /// Resize the buffer and uncompress section data into it. /// @param Out Destination buffer. template Error resizeAndDecompress(T &Out) { - Out.resize(DecompressedSize); + Out.resize_for_overwrite(DecompressedSize); return decompress({Out.data(), (size_t)DecompressedSize}); }