RFC Asan instrumentation control
Jakub Jelinek
jakub@redhat.com
Fri Jan 10 07:56:00 GMT 2014
On Fri, Jan 10, 2014 at 11:49:43AM +0400, Maxim Ostapenko wrote:
> 2014-01-10 Max Ostapenko <m.ostapenko@partner.samsung.com>
>
> * c-c++-common/asan/no-asan-stack.c: New test.
> --- /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" } */
If you want to limit to x86_64-linux only, please do:
target { { i?86-*-linux* x86_64-*-linux* } && lp64 }
instead. Also, what advantages do you see for trying to assemble
the result? If you instead just do dg-do compile, you can drop -save-temps
from dg-options and /* { dg-final { cleanup-saved-temps } } */.
> +#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 } } */
Jakub
More information about the Gcc-patches
mailing list