https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103453
--- Comment #7 from cqwrteur <unlvsur at live dot com> --- (In reply to cqwrteur from comment #6) > (In reply to Jonathan Wakely from comment #3) > > Fixed on trunk so far, but this is backportable. > > Turns out _GLIBCXX_SANITIZE_VECTOR is not defined if libsanitizer is not > built with GCC. But GCC does not support sanitizers on windows. > > Can we just remove this macro and only use _GLIBCXX_SANITIZE_STD_ALLOCATOR? clang++ -o vec vec.cc -Ofast -std=c++2b -fuse-ld=lld -fsanitize=address,undefined -D_GLIBCXX_SANITIZE_VECTOR D:\hg\fast_io\examples\0007.legacy>vec ================================================================= ==10284==ERROR: AddressSanitizer: container-overflow on address 0x021fa68f6bd8 at pc 0x7ff7dae516df bp 0x00347beff840 sp 0x00347beff888 WRITE of size 8 at 0x021fa68f6bd8 thread T0 Also works