https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111736
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, marxin at gcc dot gnu.org Target Milestone: --- >From [1], gcc is doing a KASAN check on a percpu address (when percpu access 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-=wi6u-o1wdpoesuce6qo2oapu0hezaig0udou4l5cre...@mail.gmail.com/