[libcxx-commits] [PATCH] D136765: [ASan][libcxx] Annotating std::vector with all allocators

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Nov 6 14:41:18 PST 2022


EricWF added inline comments.


================
Comment at: libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp:39
         c.reserve(2*c.size());
-        volatile T foo = c[c.size()];    // bad, but not caught by ASAN
+        volatile T foo = c[c.size() - 1];
         ((void)foo);
----------------
philnik wrote:
> Could you instead add a test that checks this case?
This seems like it's defeating the purpose of the test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136765



More information about the libcxx-commits mailing list