[Bug sanitizer/61422] False Asan positive in libopus
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 5 16:21:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61422
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If you want a testcase that crashes even for me with current trunk, then e.g.:
struct S { char c[16]; } __attribute__((packed));
__attribute__((noinline, noclone)) struct S
foo (struct S *p)
{
asm volatile ("" : : "r" (p) : "memory");
return *p;
}
int
main ()
{
struct S a __attribute__((aligned (16)));
struct S b __attribute__((aligned (16)));
__builtin_memset (&b, 0, sizeof b);
a = foo (&b);
asm volatile ("" : : "m" (a), "m" (b));
return 0;
}
More information about the Gcc-bugs
mailing list