diff mbox

ASAN: handle addressable params (PR sanitize/81040).

Message ID 20170704084758.GD2123@tucnak
State New
Headers show

Commit Message

Jakub Jelinek July 4, 2017, 8:47 a.m. UTC
On Fri, Jun 30, 2017 at 11:21:48AM +0200, Martin Liška wrote:
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/asan/function-argument-3.C
> @@ -0,0 +1,27 @@
> +// { dg-do run }
> +// { dg-shouldfail "asan" }
> +
> +typedef int v4si __attribute__ ((vector_size (16)));
> +
> +static __attribute__ ((noinline)) int
> +goo (v4si *a)
> +{
> +  return (*(volatile v4si *) (a + 1))[2];
> +}
> +
> +__attribute__ ((noinline)) int
> +foo (v4si arg)
> +{
> +  return goo (&arg);
> +}

This test fails on i686-linux when -msse2 is not on by default,
fixed thusly, committed as obvious:

2017-07-04  Jakub Jelinek  <jakub@redhat.com>

	* g++.dg/asan/function-argument-3.C: Add -Wno-psabi to additional
	options.



	Jakub
diff mbox

Patch

--- gcc/testsuite/g++.dg/asan/function-argument-3.C.jj	2017-07-03 19:03:25.000000000 +0200
+++ gcc/testsuite/g++.dg/asan/function-argument-3.C	2017-07-04 10:42:18.558716171 +0200
@@ -1,5 +1,6 @@ 
 // { dg-do run }
 // { dg-shouldfail "asan" }
+// { dg-additional-options "-Wno-psabi" }
 
 typedef int v4si __attribute__ ((vector_size (16)));