From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EB0B33858CD1; Thu, 21 Mar 2024 08:04:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB0B33858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711008257; bh=+6U0/T9ladp1PWhi0dWXTJRNq2/aIASdthYYfLh7PQQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hre520gTGRz9qKS4PXok5guncCUNiWLQdAx1+lWs5TTCgod2VzsXaq6UWOX9By28H Fu+8Plle3llx5DRDAORCy9jMyOYW+/H7Ql4AsnMJRZO5KbSVkBjz6HLD+Dv1vF5Uvp DjOEgVrdsz5JFA/Ww3hm12a4kkOh4woahDh59a+k= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/111736] Address sanitizer is not compatible with named address spaces Date: Thu, 21 Mar 2024 08:04:17 +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: 12.1.0 X-Bugzilla-Keywords: addr-space, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D111736 --- Comment #16 from Uro=C5=A1 Bizjak --- (In reply to Richard Biener from comment #13) > The original testcase is fixed, appearantly slapping 'extern' on the int > makes it not effective. >=20 > Possibly better amend the >=20 > if (VAR_P (inner) && DECL_HARD_REGISTER (inner)) > return; >=20 > check though. As indicated my fix fixed only VAR_DECL cases, there's > still pointer-based accesses (MEM_REF) to consider. So possibly even > the following is necessary I must admit that to create the patch from Comment #11 I just mindlessly searched for DECL_THREAD_LOCAL_P in asan.cc and amended the location with ADDR_SPACE_GENERIC_P check. However, ASAN should back off from annotating *any* gs: prefixed address.=20 I'll test your patch from Comment #13 ASAP.=