This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/61422] False Asan positive in libopus
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jun 2014 16:21:26 +0000
- Subject: [Bug sanitizer/61422] False Asan positive in libopus
- Auto-submitted: auto-generated
- References: <bug-61422-4 at http dot gcc dot gnu dot org/bugzilla/>
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;
}