From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AB86B3858C78; Tue, 21 May 2024 10:05:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB86B3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716285920; bh=3aUJ7pdnlRaPFDLzbgMDYxQfs6309XjNzSiwVAelpT0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=in25WSbzzTpzXFOmBQ5uKOAC6u4pFVh7ExWnJCPji9A0b4A44ZoZDQvwRFqnsXvk5 KUFyAghndoV9LXrrPw2NZvrkjYyO0FWxjMXllemUWlFCNHB9xsMldcFPGzCS4Xwz9t KHbRBKknJRq1RJ+U3gIGbx1HLaxi6XOV54ewME08= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/115172] Invalid -fsanitize=bool sanitization of variable from named address space Date: Tue, 21 May 2024 10:05:20 +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.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on 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=3D115172 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2024-05-21 --- Comment #1 from Jakub Jelinek --- Reduced testcase for -O2 -fsanitize=3Daddress,bool --param asan-instrumentation-with-call-threshold=3D100: extern struct S { _Bool b; } s; void bar (void); void foo (void) { if (*(volatile _Bool __seg_gs *) (__UINTPTR_TYPE__) &s.b) bar (); } What the kernel does is terrible, why they just don't declare the extern wi= th __seg_gs attribute?=