On Thu, Jan 21, 2021 at 06:30:06PM -0300, Alexandre Oliva wrote:
> 
> GNAT may create temporaries to hold return values of function calls.
> If such a temporary is created as part of a dynamic initializer of a
> variable in a unit other than the one being compiled, the initializer
> is dropped, including the temporary and its binding block.
> 
> Don't issue asan mark calls for such variables, they are gone.
> 
> Regstrapped on x86_64-linux-gnu.  Ok to install?
> 
> 
> for  gcc/ChangeLog
> 
>       * gimplify.c (gimplify_decl_expr): Skip asan marking calls for
>       temporaries not seen in binding block, and not about to be
>       added as gimple variables.
> 
> for  gcc/testsuite/ChangeLog
> 
>       * gnat.dg/asan1.adb: New test.
>       * gnat.dg/asan1_pkg.ads: New additional source.

Does that affect only Ada and not other languages?
Could you e.g. try --with-build-config bootstrap-asan and log which
TUs/functions it didn't posion because of this patch?
I usually use hacks like:
{
FILE *f = fopen ("/tmp/whatever", "a");
fprintf (f, "%d %s %s\n", (int) BITS_PER_WORD, main_input_filename ? 
main_input_filename : "-", current_function_name ());
fclose (f);
}

        Jakub

Reply via email to