From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04EC83858D37; Mon, 20 Nov 2023 19:29:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04EC83858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700508549; bh=cLl+CLp9ZbsZnIOk4QaiYoBdVi/pJlanZeLwkKSuK7U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gfQgMmKV08lKUxSw6WaTF0tRPx1fKka3Yt8i6Nbl5Fq/evdfioVRtC8KZqWWHs8Oj phFir5KAKp2aF3+4OL3JIZZiFUDEaNDPfxwiA++NJTzUTakd8M286mbu4bVW1wYixn reelQCY2Li9l/zX6IbmMVzTGgA6LeufG7doF2TRQ= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/112563] [14 regression] libsanitizer doesn't assemble with Solaris/sparc as Date: Mon, 20 Nov 2023 19:29:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112563 --- Comment #5 from Jakub Jelinek --- Ah, I see, the problem is that the sanitizers use (both in GCC and Clang) -fno-builtin option, which makes it not work unless user uses just memcpy. Short testcase: extern "C" void *memcpy (void *, const void *, decltype (sizeof 0)) __asm ("__sanitizer_internal_memcpy"); extern "C" void *memmove (void *, const void *, decltype (sizeof 0)) __asm ("__sanitizer_internal_memmove"); extern "C" void *memset (void *, int, decltype (sizeof 0)) __asm ("__sanitizer_internal_memset"); struct S { char s[512]; }; void foo (S *p, S *q) { *p =3D *q; } void bar (int, void *r, void *s) { memcpy (r, s, 512); } void baz (int, int, void *t, void *u) { __builtin_memcpy (t, u, 512); } On x86_64 -O2 -mstringop-strategy=3Dlibcall vs. that + -fno-builtin, on spa= rc without -mstringop-strategy=3Dlibcall.=