efriedma-quic wrote: Normal bitfield code involves loading from memory, modifying some bits, and then storing back to memory. undef is per-bit, so this works fine with normal uninitialized memory. If a byte is poisoned, this doesn't work: the loaded value is poison, so the result of the bit manipulation is also poison.
We usually don't store poison to memory precisely because of this. We're looking at improvements in this area, but there hasn't been much movement recently. I don't know what happens with memset specifically, but for a plain store of poison to memory, you should see this happen with standard optimizations, I think. (Off the top of my head, I don't think we currently do anything special in clang to handle this with msan?) https://github.com/llvm/llvm-project/pull/188001 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
