From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1CD4C3858D28; Mon, 9 Oct 2023 11:53:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CD4C3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696852391; bh=qsRgbc9JMufdnxaxFsTdF+JZXgWURKMO+HgqE/TTAiU=; h=From:To:Subject:Date:From; b=YeYriY1jGgPepWi9prfehC1F4jCWTrjBBmLmpQxVXNGyPnPUylA1V/tfvRjIBNmq0 Po+v9GknyPZ1w6pZ7McPeQkO4jbJGkMyOFkTNnvee4LlFbA2nYrjkXDCWA3IeMuTD8 APRPs9T4DBXBoa+0fccBKkaFQACzMo/w2O12gmt0= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/111736] New: Address sanitizer is not compatible with named address spaces Date: Mon, 09 Oct 2023 11:53:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 Bug ID: 111736 Summary: Address sanitizer is not compatible with named address spaces Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: ubizjak at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxi= n at gcc dot gnu.org Target Milestone: --- >From [1], gcc is doing a KASAN check on a percpu address (when percpu acces= s is implemented using named address spaces). This is not a "real" address, just= an offset from the segment register. The testcase --cut here-- int __seg_gs m; int foo (void) { return m; } --cut here-- does not show any special handling that would handle segment registers. [1] https://lore.kernel.org/lkml/CAHk-=3Dwi6U-O1wdPOESuCE6QO2OaPu0hEzaig0uDOU4L= 5CREhug@mail.gmail.com/=