[PATCH] Support asan-instrumentation-with-call-threshold in GCC (second try)

Jakub Jelinek jakub@redhat.com
Mon Jun 16 18:24:00 GMT 2014


On Mon, Jun 16, 2014 at 10:21:39PM +0400, Yury Gribov wrote:
> On 06/16/2014 04:47 PM, Yury Gribov wrote:
> >On 06/16/2014 02:34 PM, Dominique Dhumieres wrote:
> >>>Done in r211699.
> >>
> >>This breaks bootstrap on x86_64-apple-darwin13:
> >
> >Hm, perhaps I didn't run full bootstrap after last round of review.
> >Does attached patch solve the problem for you? I've started bootstrap
> >but it'll take couple of hours to complete.
> 
> Bootstrapped successfully on x64 with proposed patch.
> The original commit indeed failed to bootstrap
> (https://gcc.gnu.org/ml/gcc-testresults/2014-06/msg01419.html).
> 
> Ok to commit fix?

Ok (with proper ChangeLog entry).

> --- a/gcc/asan.c
> +++ b/gcc/asan.c
> @@ -1636,6 +1636,13 @@ build_check_stmt (location_t location, tree base, tree len,
>  
>    gcc_assert (!(size_in_bytes > 0 && !non_zero_len_p));
>  
> +  if (start_instrumented && end_instrumented)
> +    {
> +      if (!before_p)
> +        gsi_next (iter);
> +      return;
> +    }
> +
>    if (len)
>      len = unshare_expr (len);
>    else
> @@ -1735,7 +1742,7 @@ build_check_stmt (location_t location, tree base, tree len,
>    gsi_insert_after (&gsi, g, GSI_NEW_STMT);
>    tree base_addr = gimple_assign_lhs (g);
>  
> -  tree t;
> +  tree t = NULL_TREE;
>    if (real_size_in_bytes >= 8)
>      {
>        tree shadow = build_shadow_mem_access (&gsi, location, base_addr,


	Jakub



More information about the Gcc-patches mailing list