[Bug sanitizer/115172] Invalid -fsanitize=bool sanitization of variable from named address space
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 21 10:05:20 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115172
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2024-05-21
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase for -O2 -fsanitize=address,bool --param
asan-instrumentation-with-call-threshold=100:
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 with
__seg_gs attribute?
More information about the Gcc-bugs
mailing list