[Bug sanitizer/81040] asan false negative if parameter of a global function passed by reference

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 3 14:04:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81040

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Andrey Ryabinin from comment #15)
> (In reply to Martin Liška from comment #14)
> > Fixed on trunk.
> 
> Thanks.
> 
> However there is slight problem with this. Instrumentation is missing without
> -fsanitize-address-use-after-scope option.
> IMO, it should depend only on --param asan-stack=1.
> 
> So the following doesn't produce any output:
> gcc -fsanitize=address -fno-sanitize-address-use-after-scope -O2 asan_test.c
> && ./a.out
> 
> Can we fix this?

It's mistake! I've got patch for that and will send it tomorrow.


More information about the Gcc-bugs mailing list