BLAKE3
BLAKE3 copied to clipboard
Suppress MemorySanitizer false positive
MemorySanitizer does not support assembly, and therefore produces a false positive on blake3_hasher_finalize and related functions.
Note that a similar (but less comprehensive) fix was previously applied to LLVM's fork of this repo:
https://github.com/llvm/llvm-project/blob/34aff47521c3e0cbac58b0d5793197f76a304295/llvm/lib/Support/BLAKE3/blake3.c#L576
Help me make sure I understand the problem. MSan thinks some memory is uninitialized, because the writes that initialized it were inside an assembly block/file that MSan can't analyze. Is that correct? That seems like it would be a problem for all sorts of libraries, like OpenSSL. Does OpenSSL include this sort of MSan hinting?
Yes, that's all correct.
https://github.com/openssl/openssl/blob/6c0ecc2bce64cc86948a51f80f832b5e48a9ebea/crypto/engine/eng_rdrand.c#L47