[Bug sanitizer/108085] gcc trunk's ASAN at -O3 missed a stack-use-after-scope

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 23 15:25:17 GMT 2022


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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 54153
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54153&action=edit
pr108085.c.216t.uncprop1.dot.svg

So no, it's a real issue where we optimize out .ASAN_CHECK (6, &f, 4, 8); in
the exit block. As seen in the dump file, we have the very ASAN_CHECK in bb_3:
.ASAN_CHECK (7, &f, 4, 8), however, there are 2 ASAN_MARK (POISON, &f, 4) calls
that are on the path from bb_3 to the exit block.

@Jakub: Can you please take a look at the optimization algorithm why the check
is not preserved?


More information about the Gcc-bugs mailing list