public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/115284] New: [15 regression] SEGV in check_format_arg on Solaris/SPARC
@ 2024-05-29 21:40 ro at gcc dot gnu.org
  2024-05-29 21:40 ` [Bug bootstrap/115284] " ro at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: ro at gcc dot gnu.org @ 2024-05-29 21:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115284
           Summary: [15 regression] SEGV in check_format_arg on
                    Solaris/SPARC
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: hp at gcc dot gnu.org
  Target Milestone: ---
              Host: sparc*-sun-solaris2.11
            Target: sparc*-sun-solaris2.11
             Build: sparc*-sun-solaris2.11

Between 20240528 (c08b0d3f7b3539b26031de31d88dea6b94474577) and 20240529
(18f477980c8597fe3dca2c2e8bd533c0c2b17aa6),
Solaris/SPARC bootstrap (both 32 and 64-bit-default) got broken.  In stage 3,
cc1plus SEGVs:

/vol/gcc/src/hg/master/local/gcc/analyzer/supergraph.cc: In member function
'virtual void ana::superedge::dump_dot(graphviz_out*, const
dedge<ana::supergraph_traits>::dump_args_t&) const':
/vol/gcc/src/hg/master/local/gcc/analyzer/supergraph.cc:971:13: internal
compiler error: Segmentation Fault
  971 |   pp_printf (pp,
      |   ~~~~~~~~~~^~~~
  972 |              (" [style=%s, color=%s, weight=%d, constraint=%s,"
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  973 |               " ltail=\"cluster_node_%i\", lhead=\"cluster_node_%i\""
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  974 |               " headlabel=\""),
      |               ~~~~~~~~~~~~~~~~~
  975 |              style, color, weight, constraint,
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  976 |              m_src->m_index, m_dest->m_index);
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This reproduces easily with

c1plus -fpreprocessed supergraph.ii -quiet -mcpu=v9 -Wall -o supergraph.s

gdb shows

Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0x00c7dd4c in check_format_arg(void*, tree_node*, unsigned long long) ()
(gdb) bt
#0  0x00c7dd4c in check_format_arg(void*, tree_node*, unsigned long long) ()
#1  0x00c5e270 in check_function_arguments_recurse(void (*)(void*, tree_node*,
unsigned long long), void*, tree_node*, unsigned long long, opt_code) ()
#2  0x00c76b00 in check_function_format(tree_node const*, tree_node*, int,
tree_node**, vec<unsigned int, va_heap, vl_ptr>*) ()
#3  0x00c5e884 in check_function_arguments(unsigned int, tree_node const*,
tree_node const*, int, tree_node**, vec<unsigned int, va_heap, vl_ptr>*) ()
#4  0x0082bff4 in build_over_call(z_candidate*, int, int) ()
#5  0x0082e9d4 in build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int) ()
#6  0x00b85f98 in finish_call_expr(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, bool, int) ()
#7  0x00a93e1c in cp_parser_postfix_expression(cp_parser*, bool, bool, bool,
bool, cp_id_kind*) ()
#8  0x00a9b230 in cp_parser_unary_expression(cp_parser*, cp_id_kind*, bool,
bool, bool) ()
#9  0x00a64518 in cp_parser_cast_expression(cp_parser*, bool, bool, bool,
cp_id_kind*) ()
#10 0x00a65600 in cp_parser_binary_expression(cp_parser*, bool, bool, bool,
cp_parser_prec, cp_id_kind*) ()
#11 0x00a6666c in cp_parser_assignment_expression(cp_parser*, cp_id_kind*,
bool, bool) ()
#12 0x00a66c8c in cp_parser_expression(cp_parser*, cp_id_kind*, bool, bool,
bool) ()
#13 0x00a6efa0 in cp_parser_expression_statement(cp_parser*, tree_node*) ()
#14 0x00ab5e10 in cp_parser_statement(cp_parser*, tree_node*, bool, bool*,
vec<tree_node*, va_heap, vl_ptr>*, unsigned int*) ()
#15 0x00a7f5e0 in cp_parser_statement_seq_opt(cp_parser*, tree_node*) ()
#16 0x00a7f8e0 in cp_parser_compound_statement(cp_parser*, tree_node*, int,
bool) ()
#17 0x00aab70c in cp_parser_ctor_initializer_opt_and_function_body(cp_parser*,
bool) ()
#18 0x00ab2960 in cp_parser_function_definition_after_declarator(cp_parser*,
bool) ()
#19 0x00ab3ebc in cp_parser_init_declarator(cp_parser*, int,
cp_decl_specifier_seq*, vec<deferred_access_check, va_gc, vl_embed>*, bool,
bool, int, bool*, tree_node**, unsigned int*, tree_node**) ()
#20 0x00a7b638 in cp_parser_simple_declaration(cp_parser*, bool, tree_node**)
    ()
#21 0x00ac42bc in cp_parser_declaration(cp_parser*, tree_node*) ()
#22 0x00ac29bc in cp_parser_declaration_seq_opt(cp_parser*) ()
#23 0x00ac3000 in cp_parser_namespace_definition(cp_parser*) ()
#24 0x00ac4ad0 in cp_parser_declaration(cp_parser*, tree_node*) ()
#25 0x00ac5550 in c_parse_file() ()
#26 0x00c9f15c in c_common_parse_file() ()
#27 0x013d858c in compile_file() ()
#28 0x013dc25c in toplev::main(int, char**) ()
#29 0x02284358 in main ()

A reghunt identified this patch

commit 933ab59c59bdc1ac9e3ca3a56527836564e1821b
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Tue May 28 23:16:48 2024 +0200

    resource.cc: Replace calls to find_basic_block with cfgrtl BLOCK_FOR_INSN

as the culprit.

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

end of thread, other threads:[~2024-06-03 13:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-29 21:40 [Bug bootstrap/115284] New: [15 regression] SEGV in check_format_arg on Solaris/SPARC ro at gcc dot gnu.org
2024-05-29 21:40 ` [Bug bootstrap/115284] " ro at gcc dot gnu.org
2024-05-29 22:08 ` hp at gcc dot gnu.org
2024-05-29 22:14 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-29 22:44 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-29 23:00 ` hp at gcc dot gnu.org
2024-05-30  1:31 ` hp at gcc dot gnu.org
2024-05-30  1:39 ` hp at gcc dot gnu.org
2024-05-30  9:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-30  9:58 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-30 11:42 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-30 15:31 ` hp at gcc dot gnu.org
2024-05-31 12:33 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-06-01  3:35 ` hp at gcc dot gnu.org
2024-06-03 11:36 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-06-03 13:51 ` hp 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).