[Lldb-commits] [PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

Petr Hosek via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 13 14:29:41 PDT 2022


phosek added inline comments.


================
Comment at: llvm/lib/Support/Compression.cpp:63
   __msan_unpoison(CompressedBuffer.data(), CompressedSize);
-  CompressedBuffer.truncate(CompressedSize);
+  if (CompressedSize < CompressedBuffer.size())
+    CompressedBuffer.truncate(CompressedSize);
----------------
I'd make changes to zlib separately.


================
Comment at: llvm/lib/Support/Compression.cpp:86
                              UncompressedSize);
-  UncompressedBuffer.truncate(UncompressedSize);
+  if (UncompressedSize < UncompressedBuffer.size())
+    UncompressedBuffer.truncate(UncompressedSize);
----------------
Ditto here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128465



More information about the lldb-commits mailing list