This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/61422] False Asan positive in libopus


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]