llvm-project
eee3db40 - [libc] Remove MSAN_UNPOISON from `bit_cast` and `bit_copy` (#183124)

Commit
5 days ago
[libc] Remove MSAN_UNPOISON from `bit_cast` and `bit_copy` (#183124) The `MSAN_UNPOISON` calls were manually unpoisoning the source memory, which can hide legitimate bugs where uninitialized memory is being copied. `MSAN_UNPOISON` should not be used in such wide spread utilities as `bit_cast` and `bit_copy` but rather close to API boundary where have no better way to avoid uninitialized bits. * `MSAN_UNPOISON` was add to `bit_copy` with #165015, but it looks like a copy-paste from `bit_cast`. * `bit_cast` has it from #70067, but I can't find valid reproducer any more. If it's still the issue, `MSAN_UNPOISON` \ should move close the source of uninitialized values.
Author
Parents
Loading