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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jerry DeLisle <[email protected]>:

https://gcc.gnu.org/g:ff2f6c5153ecc142e1821a26b4a5184b4fe30607

commit r16-7577-gff2f6c5153ecc142e1821a26b4a5184b4fe30607
Author: Jerry DeLisle <[email protected]>
Date:   Wed Feb 18 16:19:26 2026 -0800

    Fortran: Fix heap-use-after-free

    This fix stops freeing the current BLOCK namespace during malformed
    END error recovery.  It now lets normal block unwinding/cleanup handle
    the free, preventing the heap-use-after-free.

    Suggested-by: Jakub Jelinek <[email protected]>
    Signed-off-by: Christopher Albert <[email protected]>

            PR fortran/122491

    gcc/fortran/ChangeLog:

            * decl.cc (gfc_match_end): Do not free current BLOCK namespace
            during malformed END cleanup.

Reply via email to