https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70573

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Right. Dominique, can you check if s/memset/__builtin_memset/g fixes the 
> issue?

The test succeeds with the following patch

--- ../_clean/gcc/testsuite/c-c++-common/asan/halt_on_error-1.c 2015-11-23
10:17:05.000000000 +0100
+++ gcc/testsuite/c-c++-common/asan/halt_on_error-1.c   2016-04-07
18:10:11.000000000 +0200
@@ -9,7 +9,7 @@ volatile int ten = 10;

 int main() {
   char x[10];
-  memset(x, 0, ten + 1);
+  __builtin_memset(x, 0, ten + 1);
   asm volatile ("" : : : "memory");
   volatile int res = x[ten];
   x[ten] = res + 3;

Thanks.

Reply via email to