llvm-capstone/libcxx
Hans Wennborg 7bf5f62574 Revert "[ASan][libcxx] Annotating std::vector with all allocators"
This caused false container-overflow errors when using a custom allocator that
touches the memory on deallocation: GitHub Issue #60384

> This revision is a part of a series of patches extending
> AddressSanitizer C++ container overflow detection
> capabilities by adding annotations, similar to those existing
> in std::vector, to std::string and std::deque collections.
> These changes allow ASan to detect cases when the instrumented
> program accesses memory which is internally allocated by
> the collection but is still not in-use (accesses before or
> after the stored elements for std::deque, or between the size and
> capacity bounds for std::string).
>
> The motivation for the research and those changes was a bug,
> found by Trail of Bits, in a real code where an out-of-bounds read
> could happen as two strings were compared via a std::equals function
> that took iter1_begin, iter1_end, iter2_begin iterators
> (with a custom comparison function).
> When object iter1 was longer than iter2, read out-of-bounds on iter2
> could happen. Container sanitization would detect it.
>
> In revision D132522, support for non-aligned memory buffers (sharing
> first/last granule with other objects) was added, therefore the
> check for standard allocator is not necessary anymore.
> This patch removes the check in std::vector annotation member
> function (__annotate_contiguous_container) to support
> different allocators.
>
> If you have any questions, please email:
>  - advenam.tacet@trailofbits.com
>  - disconnect3d@trailofbits.com
>
> Reviewed By: #libc, #sanitizers, philnik, vitalybuka
>
> Spies: EricWF, philnik, #sanitizers, libcxx-commits
>
> Differential Revision: https://reviews.llvm.org/D136765

This reverts commit 4905550268.
2023-01-30 13:24:44 +01:00
..
benchmarks [libc++] Enable segmented iterator optimizations for join_view::iterator 2023-01-20 07:55:58 +01:00
cmake [libc++] Remove old CI configurations and update the supported compiler versions 2023-01-20 06:04:35 +01:00
docs [libc++] Addresses LWG3754 2023-01-28 18:15:48 +01:00
include Revert "[ASan][libcxx] Annotating std::vector with all allocators" 2023-01-30 13:24:44 +01:00
lib [libc++] Add FreeBSD exceptions.nonew ABI list 2023-01-11 13:42:04 -05:00
src [libc++] Move the definition of aligned allocation helpers outside of <new> 2023-01-26 14:41:13 -05:00
test Revert "[ASan][libcxx] Annotating std::vector with all allocators" 2023-01-30 13:24:44 +01:00
utils [libc++] Add documentation for reproducing CI issues locally 2023-01-26 14:52:20 -05:00
.clang-format [libc++][NFC] Rename the constexpr macros 2022-08-19 15:35:02 +02:00
.clang-tidy [libc++][clang-tidy] Enable readability-simplify-boolean-expr 2022-11-24 00:42:19 +01:00
.gitignore
appveyor-reqs-install.cmd
appveyor.yml [libc++] Re-apply "Always build c++experimental.a"" 2022-07-19 10:44:19 -04:00
CMakeLists.txt [libc++] Remove warning for LIBCXX_SYSROOT, LIBCXX_TARGET_TRIPLE, and LIBCXX_GCC_TOOLCHAIN 2023-01-10 13:07:04 -07:00
CREDITS.TXT
LICENSE.TXT
TODO.TXT