public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/97130] New: [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462
@ 2020-09-21  4:41 asolokha at gmx dot com
  2020-09-21  6:56 ` [Bug analyzer/97130] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2020-09-21  4:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97130
           Summary: [11 Regression] ICE in deref_rvalue, at
                    analyzer/region-model.cc:1462
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200920 snapshot (g:363e7755f227656684c8e284307ceee451503ca4)
ICEs when compiling the following testcase w/ -fanalyzer:

void *
memset (int, int, __SIZE_TYPE__);

void
mp (int xl)
{
  memset (xl, 0, sizeof xl);
}

% gcc-11.0.0 -fanalyzer -w -c oxnsb1da.c
during IPA pass: analyzer
oxnsb1da.c: In function 'mp':
oxnsb1da.c:7:3: internal compiler error: in deref_rvalue, at
analyzer/region-model.cc:1462
    7 |   memset (xl, 0, sizeof xl);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
0x7335ac ana::region_model::deref_rvalue(ana::svalue const*, tree_node*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/region-model.cc:1462
0x114a98e ana::region_model::impl_call_memset(ana::call_details const&)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/region-model-impl-calls.cc:312
0x114092d ana::region_model::on_call_pre(gcall const*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/region-model.cc:742
0x111dfc4 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*) const
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/engine.cc:1084
0x111fa7d ana::exploded_graph::process_node(ana::exploded_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/engine.cc:2724
0x112055a ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/engine.cc:2359
0x112265f ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/engine.cc:4310
0x112327c ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/engine.cc:4378
0x1117038 execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200920/work/gcc-11-20200920/gcc/analyzer/analyzer-pass.cc:84

The failing assert was introduced in
g:35e3f0829d8e9cdc7ea19917c9f3a7add3f14847.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/97130] [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462
  2020-09-21  4:41 [Bug analyzer/97130] New: [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462 asolokha at gmx dot com
@ 2020-09-21  6:56 ` rguenth at gcc dot gnu.org
  2020-09-21 16:07 ` dmalcolm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-21  6:56 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/97130] [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462
  2020-09-21  4:41 [Bug analyzer/97130] New: [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462 asolokha at gmx dot com
  2020-09-21  6:56 ` [Bug analyzer/97130] " rguenth at gcc dot gnu.org
@ 2020-09-21 16:07 ` dmalcolm at gcc dot gnu.org
  2020-09-21 22:51 ` cvs-commit at gcc dot gnu.org
  2020-09-21 22:55 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-09-21 16:07 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-09-21
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug; am testing a fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/97130] [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462
  2020-09-21  4:41 [Bug analyzer/97130] New: [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462 asolokha at gmx dot com
  2020-09-21  6:56 ` [Bug analyzer/97130] " rguenth at gcc dot gnu.org
  2020-09-21 16:07 ` dmalcolm at gcc dot gnu.org
@ 2020-09-21 22:51 ` cvs-commit at gcc dot gnu.org
  2020-09-21 22:55 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-21 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:1e19ecd79b45af6df87a6869d1936b857c9f71fc

commit r11-3341-g1e19ecd79b45af6df87a6869d1936b857c9f71fc
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Mon Sep 21 11:59:26 2020 -0400

    analyzer: fix ICE on bogus decl of memset [PR97130]

    Verify that arguments are pointers before calling handling code
    that calls deref_rvalue on them.

    gcc/analyzer/ChangeLog:
            PR analyzer/97130
            * region-model-impl-calls.cc (call_details::get_arg_type): New.
            * region-model.cc (region_model::on_call_pre): Check that the
            initial arg is a pointer before calling impl_call_memset and
            impl_call_strlen.
            * region-model.h (call_details::get_arg_type): New decl.

    gcc/testsuite/ChangeLog:
            PR analyzer/97130
            * gcc.dg/analyzer/pr97130.c: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/97130] [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462
  2020-09-21  4:41 [Bug analyzer/97130] New: [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-09-21 22:51 ` cvs-commit at gcc dot gnu.org
@ 2020-09-21 22:55 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-09-21 22:55 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above commit.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-21 22:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  4:41 [Bug analyzer/97130] New: [11 Regression] ICE in deref_rvalue, at analyzer/region-model.cc:1462 asolokha at gmx dot com
2020-09-21  6:56 ` [Bug analyzer/97130] " rguenth at gcc dot gnu.org
2020-09-21 16:07 ` dmalcolm at gcc dot gnu.org
2020-09-21 22:51 ` cvs-commit at gcc dot gnu.org
2020-09-21 22:55 ` dmalcolm at gcc dot gnu.org

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).