Hi!

>>> * c-c++-common/asan/no-asan-stack.c (this triggers read overflow
>>> because we haven't found a cross-platform way to grep for stack
>>> redzones instrumentation)
>>
>> I'd prefer no test in that case, or just some semi-platform specific test >> (scan that the 0x41b58ab3 constant doesn't appear in say some late RTL dump, >> or perhaps just assembly (just scan it with lower and upper case and decimal
>> too)).
>
> Thanks, commited in 206458 without c-c++-common/asan/no-asan-stack.c testfile.
> I'll fix this test according to your recommendations a bit later.

I've fixed the c-c++-common/asan/no-asan-stack.c testfile. Tested on
x86_64-unknown-linux-gnu.

Ok to commit?

-Maxim.
2014-01-10  Max Ostapenko  <m.ostape...@partner.samsung.com>

	* c-c++-common/asan/no-asan-stack.c: New test.

diff --git a/gcc/testsuite/c-c++-common/asan/no-asan-stack.c b/gcc/testsuite/c-c++-common/asan/no-asan-stack.c
new file mode 100644
index 0000000..d81b834
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-asan-stack.c
@@ -0,0 +1,17 @@
+/* { dg-do assemble { target { x86_64-unknown-linux-gnu } } } */
+/* { dg-options "-save-temps --param asan-stack=0" } */
+#include <string.h>
+
+volatile int one = 1;
+
+int
+main ()
+{
+  volatile char a1[] = {one, 2, 3, 4};
+  volatile char a2[] = {1, 2*one, 3, 4};
+  volatile int res = memcmp ((void *)a1,(void *)a2, 5 + one);
+  return 0;
+}
+
+/* { dg-final { scan-assembler-not "0x41b58ab3|0x41B58AB3|1102416563" } } */
+/* { dg-final { cleanup-saved-temps } } */

Reply via email to