public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/96723] [11 Regression] ICE: SIGSEGV: infinite recursion in ana::region::get_subregions_for_binding with -Og -fanalyzer
Date: Thu, 20 Aug 2020 21:02:45 +0000	[thread overview]
Message-ID: <bug-96723-4-8mf6dl4m0u@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96723-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:00cb0f5840795698557731c6e549a5ce99573223

commit r11-2789-g00cb0f5840795698557731c6e549a5ce99573223
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Aug 20 10:00:49 2020 -0400

    analyzer: fix infinite recursion ICE on unions [PR96723]

    Attempts to store sm-state into a union in C++ triggered an infinite
    recursion when trying to generate a representative tree, due to
    erroneously trying to use the dtor of the union as a field.

    Fix it by filtering out non-FIELD_DECLs when walking TYPE_FIELDs
    in region::get_subregions_for_binding.

    gcc/analyzer/ChangeLog:
            PR analyzer/96723
            * region-model-manager.cc
            (region_model_manager::get_field_region): Assert that field is a
            FIELD_DECL.
            * region.cc (region::get_subregions_for_binding): In
            union-handling, filter the TYPE_FIELDS traversal to just
FIELD_DECLs.

    gcc/testsuite/ChangeLog:
            PR analyzer/96723
            * g++.dg/analyzer/pr96723.C: New test.

  parent reply	other threads:[~2020-08-20 21:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 11:06 [Bug analyzer/96723] New: " zsojka at seznam dot cz
2020-08-20 17:13 ` [Bug analyzer/96723] " dmalcolm at gcc dot gnu.org
2020-08-20 18:01 ` asolokha at gmx dot com
2020-08-20 21:02 ` cvs-commit at gcc dot gnu.org [this message]
2020-08-20 21:04 ` dmalcolm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-96723-4-8mf6dl4m0u@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).