public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/101547] New: [12 Regression] ICE: Segmentation fault (in c_tree_printer)
@ 2021-07-21  9:05 asolokha at gmx dot com
  2021-07-21 13:17 ` [Bug analyzer/101547] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2021-07-21  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101547
           Summary: [12 Regression] ICE: Segmentation fault (in
                    c_tree_printer)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-12.0.0-alpha20210718 snapshot (g:6ae8aac19cdbdbd96d90f86e4d8505fe121bdf06)
ICEs when compiling the following testcase w/ -fanalyzer:

char *
fopen (const char *restrict, const char *restrict);

void
k2 (void)
{
  char *setfiles[1];
  int i;

  setfiles[i] = fopen ("", "");
}

% gcc-12.0.0 -fanalyzer -c zlrtucfi.c
during IPA pass: analyzer
zlrtucfi.c:10:15: internal compiler error: Segmentation fault
   10 |   setfiles[i] = fopen ("", "");
      |   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
0xe3c9af crash_signal
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/toplev.c:328
0x860ab0 c_tree_printer
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/c/c-objc-common.c:305
0x860ab0 c_tree_printer
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/c/c-objc-common.c:258
0x1aa776d pp_format(pretty_printer*, text_info*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/pretty-print.c:1475
0x11f810b ana::evdesc::event_desc::formatted_print(char const*, ...) const
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/pending-diagnostic.cc:64
0x1a34c36 ana::warning_event::get_desc(bool) const
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/checker-path.cc:887
0x1a34482 ana::checker_event::prepare_for_emission(ana::checker_path*,
ana::pending_diagnostic*, diagnostic_event_id_t)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/checker-path.cc:149
0x1a47605 ana::checker_path::prepare_for_emission(ana::pending_diagnostic*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/checker-path.h:571
0x1a47605 ana::diagnostic_manager::emit_saved_diagnostic(ana::exploded_graph
const&, ana::saved_diagnostic const&)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/diagnostic-manager.cc:1192
0x1a4af37 ana::dedupe_winners::emit_best(ana::diagnostic_manager*,
ana::exploded_graph const&)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/diagnostic-manager.cc:1095
0x1a47ba1 ana::diagnostic_manager::emit_saved_diagnostics(ana::exploded_graph
const&)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/diagnostic-manager.cc:1146
0x11eef0d ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:4986
0x11efd80 ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:5043
0x11e0e48 execute
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/analyzer-pass.cc:87

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

* [Bug analyzer/101547] [12 Regression] ICE: Segmentation fault (in c_tree_printer)
  2021-07-21  9:05 [Bug analyzer/101547] New: [12 Regression] ICE: Segmentation fault (in c_tree_printer) asolokha at gmx dot com
@ 2021-07-21 13:17 ` rguenth at gcc dot gnu.org
  2021-07-21 23:20 ` cvs-commit at gcc dot gnu.org
  2021-07-21 23:28 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-21 13:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug analyzer/101547] [12 Regression] ICE: Segmentation fault (in c_tree_printer)
  2021-07-21  9:05 [Bug analyzer/101547] New: [12 Regression] ICE: Segmentation fault (in c_tree_printer) asolokha at gmx dot com
  2021-07-21 13:17 ` [Bug analyzer/101547] " rguenth at gcc dot gnu.org
@ 2021-07-21 23:20 ` cvs-commit at gcc dot gnu.org
  2021-07-21 23:28 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-21 23:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 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:893b12cc12877aca1c9df6272123b26eddf12722

commit r12-2460-g893b12cc12877aca1c9df6272123b26eddf12722
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Wed Jul 21 19:19:31 2021 -0400

    analyzer: bulletproof -Wanalyzer-file-leak [PR101547]

    gcc/analyzer/ChangeLog:
            PR analyzer/101547
            * sm-file.cc (file_leak::emit): Handle m_arg being NULL.
            (file_leak::describe_final_event): Handle ev.m_expr being NULL.

    gcc/testsuite/ChangeLog:
            PR analyzer/101547
            * gcc.dg/analyzer/pr101547.c: New test.

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

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

* [Bug analyzer/101547] [12 Regression] ICE: Segmentation fault (in c_tree_printer)
  2021-07-21  9:05 [Bug analyzer/101547] New: [12 Regression] ICE: Segmentation fault (in c_tree_printer) asolokha at gmx dot com
  2021-07-21 13:17 ` [Bug analyzer/101547] " rguenth at gcc dot gnu.org
  2021-07-21 23:20 ` cvs-commit at gcc dot gnu.org
@ 2021-07-21 23:28 ` dmalcolm at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2021-07-21 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this; confirmed.

Should be fixed by the above patch.

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

end of thread, other threads:[~2021-07-21 23:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  9:05 [Bug analyzer/101547] New: [12 Regression] ICE: Segmentation fault (in c_tree_printer) asolokha at gmx dot com
2021-07-21 13:17 ` [Bug analyzer/101547] " rguenth at gcc dot gnu.org
2021-07-21 23:20 ` cvs-commit at gcc dot gnu.org
2021-07-21 23:28 ` 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).