[Bug fortran/122491] [16 Regression] asan instrumented gcc: heap-use-after-free in fortran/parse.cc:1861 while running gfortran.dg/pr103508.f90
albert at tugraz dot at
gcc-bugzilla@gcc.gnu.org
Tue Feb 17 23:11:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122491
Christopher Albert <albert at tugraz dot at> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |albert at tugraz dot at
--- Comment #7 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 63712
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63712&action=edit
Avoid UAF on missing END BLOCK cleanup
In gcc/fortran/decl.cc:gfc_match_end, the fix stops freeing the current BLOCK
namespace during malformed END error recovery; it now lets normal block
unwinding/cleanup handle lifetime, preventing the heap-use-after-free.
More information about the Gcc-bugs
mailing list