[libcxx-commits] [PATCH] D132090: [1a/3][ASan][compiler-rt] API for double ended containers

Tacet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 8 10:53:27 PDT 2022


AdvenamTacet added a comment.

Hey @ldionne, thank you for your interest in my patches. I think your proposition is fundamentally different from ASan.

- ASan is not designed to work on production and as far as I know, using it may increase attack surface.
- With ASan, almost every memory access is instrumented, while with "smart iterators" only accesses with those iterators are checked.

My idea to evaluate if there is a point in implementing "smart iterators" is estimating the percentage of container overflows with iterators and raw pointers.
It may be possible with the oss-fuzz project tracker (https://bugs.chromium.org/p/oss-fuzz/issues/list?q=container%20overflow&can=1).
Also, [almost] every memory bug detected by "smart iterator" should be detected by ASan as well (if the container is annotated).
But "smart iterators" may work faster and in more situations.

However, I did not think about that kind of patch and therefore I do not have an opinion.

> the typical slowdown for using ASAN is documented as roughly 2x

As you mentioned performance, I want to point out that my changes shouldn't noticeably change it. My code creates additional overhead only for functions modifying deques/strings. Every memory access to those containers is instrumented in the same way with and without my changes, rest of the program is not modified.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132090



More information about the libcxx-commits mailing list