[libcxx-commits] [PATCH] D96842: [dfsan] Do not specialize vector<bool> for DFSan
stephan.yichao.zhao via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 17 11:30:01 PST 2021
stephan.yichao.zhao added a comment.
DFSan's memory and CPU overhead is 2-3x because each user byte has 1-2 shadow byte, and user instructions have additional inserted code to propagate shadow data. So the overhead added to std::vector<bool> is acceptable.
The ideal fix is like this change. This way DFSan can accurately track flows.
Zeroing out after reserve can ensure DFSan does not read undefined shadow data, but because vector<bool> updates data at bit-level while dfsan tracks at byte-level, dfsan's tracking would not be accurate.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits