[Bug analyzer/106551] [13 Regression] dup2 causes -fanalyzer ICE in valid_to_unchecked_state, at analyzer/sm-fd.cc:751

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 11 16:21:53 GMT 2022


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Immad Mir <mir@gcc.gnu.org>:

https://gcc.gnu.org/g:837142257cbde3cc03ee0dacd1d7b2fb4fa48bae

commit r13-2023-g837142257cbde3cc03ee0dacd1d7b2fb4fa48bae
Author: Immad Mir <mirimmad@outlook.com>
Date:   Thu Aug 11 21:45:54 2022 +0530

    analyzer: fix ICE casued by dup2 in sm-fd.cc[PR106551]

    This patch fixes the ICE caused by valid_to_unchecked_state,
    at analyzer/sm-fd.cc by handling the m_start state in
    check_for_dup.

    Tested lightly on x86_64.

    gcc/analyzer/ChangeLog:
            PR analyzer/106551
            * sm-fd.cc (check_for_dup): handle the m_start
            state when transitioning the state of LHS
            of dup, dup2 and dup3 call.

    gcc/testsuite/ChangeLog:
            * gcc.dg/analyzer/fd-dup-1.c: New testcases.
            * gcc.dg/analyzer/fd-uninit-1.c: Remove bogus
            warning.
    Signed-off-by: Immad Mir <mirimmad@outlook.com>


More information about the Gcc-bugs mailing list