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/70573] FAIL: c-c++-common/asan/halt_on_error-1.c -O* execution test x86_64-apple-darwin15


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.

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