From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6CB993858D3C; Wed, 1 Dec 2021 01:22:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CB993858D3C From: "unlvsur at live dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103453] ASAN detection with clang Date: Wed, 01 Dec 2021 01:22:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: unlvsur at live dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 01:22:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103453 --- Comment #7 from cqwrteur --- (In reply to cqwrteur from comment #6) > (In reply to Jonathan Wakely from comment #3) > > Fixed on trunk so far, but this is backportable. >=20 > Turns out _GLIBCXX_SANITIZE_VECTOR is not defined if libsanitizer is not > built with GCC. But GCC does not support sanitizers on windows. >=20 > Can we just remove this macro and only use _GLIBCXX_SANITIZE_STD_ALLOCATO= R? clang++ -o vec vec.cc -Ofast -std=3Dc++2b -fuse-ld=3Dlld -fsanitize=3Daddress,undefined -D_GLIBCXX_SANITIZE_VECTOR D:\hg\fast_io\examples\0007.legacy>vec =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D10284=3D=3DERROR: AddressSanitizer: container-overflow on address 0x0= 21fa68f6bd8 at pc 0x7ff7dae516df bp 0x00347beff840 sp 0x00347beff888 WRITE of size 8 at 0x021fa68f6bd8 thread T0 Also works=