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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>:

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

commit r11-2707-gee88b536069db8f870c444c441182a9c76ec5bba
Author: David Malcolm <dmalc...@redhat.com>
Date:   Fri Aug 14 10:48:30 2020 -0400

    analyzer: fix ICE on escaped unknown pointers [PR96611]

    PR analyzer/96611 reports an ICE within the handling for unknown
    functions, when passing a pointer to something accessed via a
    global pointer, after an unknown function has already been called.

    The first unknown function leads to the store being flagged, so
    the access to the global pointer leads to (*unknown_svalue) for
    the base region of the argument to the 2nd function, and thus
    *unknown_svalue being reachable by the 2nd unknown function,
    triggering an assertion failure.

    Handle this case by rejecting attempts to get a cluster for
    the unknown pointer, fixing the ICE.

    gcc/analyzer/ChangeLog:
            PR analyzer/96611
            * store.cc (store::mark_as_escaped): Reject attempts to
            get a cluster for an unknown pointer.

    gcc/testsuite/ChangeLog:
            PR analyzer/96611
            * gcc.dg/analyzer/pr96611.c: New test.

Reply via email to