[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 24 09:59:13 PST 2021


stephan.yichao.zhao updated this revision to Diff 326131.
stephan.yichao.zhao added a comment.

Before doing a complete test, this shows how one potential change would look like.
Please have a look and see if this is on the right way.

What the change does are

1. extended all operations of __bit_reference/_bit_iterator with dfsan label propagation The two classes take an additional iterator of dfsan label storage
2. vector<bool> uses <__bit_reference>, and allocates dfsan label storage We use vector<int> as the storage, so we can get all operations like copy/fill for free.
3. bitset uses <__bit_reference>. So it got changed, and this increases dfsan accuracy too. Its change is more than vector<bool> because its logic is not only in __bit_reference.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96842/new/

https://reviews.llvm.org/D96842

Files:
  libcxx/include/__bit_reference
  libcxx/include/bitset
  libcxx/include/vector

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96842.326131.patch
Type: text/x-patch
Size: 39208 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210224/4dbc2619/attachment-0001.bin>


More information about the libcxx-commits mailing list