[msan] Annotate zlib functions for MemorySanitizer.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 25 Nov 2014 15:24:07 +0000 (15:24 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Tue, 25 Nov 2014 15:24:07 +0000 (15:24 +0000)
commitccac3a02298a02bc359f9ea0ee03c9a8d54c68ab
tree00683171f758ab91b0bbec1fe0cec0c329522ccc
parentb3d06a043a4c8c856d77d14b00048a1500896066
[msan] Annotate zlib functions for MemorySanitizer.

Mark destination buffer in zlib::compress and zlib::decompress as fully
initialized.

When building LLVM with system zlib and MemorySanitizer instrumentation,
MSan does not observe memory writes in zlib code and erroneously considers
zlib output buffers as uninitialized, resulting in false use-of-uninitialized
memory reports. This change helps MSan understand the state of that memory
and prevents such reports.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222763 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Compression.cpp