From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5536 invoked by alias); 24 Oct 2011 18:31:06 -0000 Received: (qmail 5518 invoked by uid 22791); 24 Oct 2011 18:31:03 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Oct 2011 18:30:47 +0000 From: "markus at trippelsdorf dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50858] New: [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981 Date: Mon, 24 Oct 2011 18:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus at trippelsdorf dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02490.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D50858 Bug #: 50858 Summary: [4.7 Regression] segfault at ../../gcc/libiberty/hashtab.c:981 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: markus@trippelsdorf.de Segfault happened when building chromium. % cat test.ii class String { typedef struct ImplicitConversionFromWTFStringToBoolDisallowedA*=20 (String::*UnspecifiedBoolTypeA); typedef struct ImplicitConversionFromWTFStringToBoolDisallowedB*=20 (String::*UnspecifiedBoolTypeB); operator UnspecifiedBoolTypeA() const; operator UnspecifiedBoolTypeB() const; }; inline bool equalIgnoringCase(const String& a, const String& b) { } inline bool equalPossiblyIgnoringCase(const String& a,=20 const String& b, bool ignoreCase) { return ignoreCase ? equalIgnoringCase(a, b) : (a =3D=3D b); % g++ test.ii test.ii: In function =E2=80=98bool equalPossiblyIgnoringCase(const String&,= const String&, bool)=E2=80=99: test.ii:9:57: internal compiler error: Segmentation fault Please submit a full bug report, % gdb g++ GNU gdb (Gentoo 7.3.1 p1) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/bin/g++...(no debugging symbols found)...done. (gdb) set follow-fork-mode child (gdb) run test.ii Starting program: /usr/bin/g++ test.ii warning: no loadable sections found in added symbol-file system-supplied DS= O at 0x7ffff7ffa000 process 17289 is executing new program: /usr/x86_64-pc-linux-gnu/gcc-bin/4.7.0/g++ [New process 17295] process 17295 is executing new program: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.0/cc1plus Program received signal SIGSEGV, Segmentation fault. [Switching to process 17295] iterative_hash (k_in=3D, length=3D, initval=3D) at ../../gcc/libiberty/hashtab.c:981 981 case 4 : a+=3D((hashval_t)k[3]<<24); (gdb) bt #0 iterative_hash (k_in=3D, length=3D, initval=3D) at ../../gcc/libiberty/hashtab.c:981 #1 0x000000000093ca7b in build_offset_type (basetype=3D0x7ffff71c2348, type=3D0x6e6f6c20676e6f6c) at ../../gcc/gcc/tree.c:7850 #2 0x000000000093cadb in build_offset_type (basetype=3D0x7ffff71c2348, type=3D0x7ffff706dd68) at ../../gcc/gcc/tree.c:7864 #3 0x0000000000523085 in composite_pointer_type_r (t1=3D0x7ffff71c2930, t2=3D0x7ffff71c2690, operation=3DCPO_CONVERSION, complain=3D) at ../../gcc/gcc/cp/typeck.c:538 #4 0x0000000000498b73 in add_builtin_candidate (candidates=3D0x7fffffffd1b= 8, code=3D, code2=3D, fnname=3D0x7ffff7079cb8, type1=3D, type2=3D, args=3D0x7fffffffd1c0, argtypes=3D0x7fffffffd0e0, flags=3D3) at ../../gcc/gcc/cp/call.c:2587 #5 0x00000000004990dc in add_builtin_candidates (candidates=3D0x7fffffffd1= b8, code=3DEQ_EXPR, code2=3DNOP_EXPR, fnname=3D0x7ffff7079cb8, args=3D0x7fffffffd1c0, flags=3D3) at ../../gcc/gcc/cp/call.c:2790 #6 0x000000000049e441 in build_new_op_1 (code=3DEQ_EXPR, flags=3D3, arg1=3D0x7ffff71b3f78, arg2=3D0x7ffff71b3fa0, arg3=3D0x0, overload=3D0x7fff= ffffd318, complain=3D3) at ../../gcc/gcc/cp/call.c:4991 #7 0x000000000049eb6f in build_new_op (code=3DEQ_EXPR, flags=3D3, arg1=3D0x7ffff71b3f78, arg2=3D0x7ffff71b3fa0, arg3=3D, overload=3D, complain=3D3) at ../../gcc/gcc/cp/call.c:52= 56 #8 0x000000000051ff45 in build_x_binary_op (code=3DEQ_EXPR, arg1=3D0x7ffff= 71b3f78, arg1_code=3DERROR_MARK, arg2=3D0x7ffff71b3fa0, arg2_code=3DERROR_MARK, overload=3D, complain=3D3) at ../../gcc/gcc/cp/typeck.c:= 3540 #9 0x0000000000508b2c in cp_parser_binary_expression (parser=3D0x7ffff71bf= 688, cast_p=3D, no_toplevel_fold_p=3D0 '\000', prec=3DPREC_NOT_OPERATOR, pidk=3D) at ../../gcc/gcc/cp/parser.c:7009 #10 0x0000000000508e23 in cp_parser_assignment_expression (parser=3D0x7ffff71bf688, cast_p=3D0 '\000', pidk=3D0x7fffffffd664) at ../../gcc/gcc/cp/parser.c:7114 #11 0x000000000050ecac in cp_parser_expression (parser=3D0x7ffff71bf688, cast_p=3D, pidk=3D0x7fffffffd664) at ../../gcc/gcc/cp/parser.c:7260 #12 0x0000000000503087 in cp_parser_primary_expression (parser=3D0x7ffff71b= f688, address_p=3D, cast_p=3D0 '\000', template_arg_p=3D0 '\000', idk=3D0x7fffffffd664) at ../../gcc/gcc/cp/parser.c:3701 #13 0x00000000005048a6 in cp_parser_postfix_expression (parser=3D0x7ffff71b= f688, address_p=3D0 '\000', cast_p=3D0 '\000', member_access_only_p=3D0 '\000', pidk_return=3D0x0) at ../../gcc/gcc/cp/parser.c:5228 #14 0x00000000005017c3 in cp_parser_unary_expression (parser=3D0x7ffff71bf6= 88, address_p=3D0 '\000', cast_p=3D0 '\000', pidk=3D0x0) at ../../gcc/gcc/cp/parser.c:6224 #15 0x000000000050892b in cp_parser_binary_expression (parser=3D0x7ffff71bf= 688, cast_p=3D, no_toplevel_fold_p=3D0 '\000', prec=3DPREC_NOT_OPERATOR, pidk=3D) at ../../gcc/gcc/cp/parser.c:6895 #16 0x0000000000508e23 in cp_parser_assignment_expression (parser=3D0x7ffff71bf688, cast_p=3D0 '\000', pidk=3D0x0) at ../../gcc/gcc/cp/parser.c:7114 #17 0x0000000000508f79 in cp_parser_question_colon_clause (logical_or_expr=3D0x7ffff706e990, parser=3D0x7ffff71bf688) at ../../gcc/gcc/cp/parser.c:7078 #18 cp_parser_assignment_expression (parser=3D0x7ffff71bf688, cast_p=3D0 '\= 000', pidk=3D) at ../../gcc/gcc/cp/parser.c:7119 #19 0x000000000050ecac in cp_parser_expression (parser=3D0x7ffff71bf688, cast_p=3D, pidk=3D0x0) at ../../gcc/gcc/cp/parser.c:7260 #20 0x00000000004fc520 in cp_parser_jump_statement (parser=3D0x7ffff71bf688= ) at ../../gcc/gcc/cp/parser.c:9495 #21 cp_parser_statement (parser=3D0x7ffff71bf688, in_statement_expr=3D0x0, in_compound=3D, if_p=3D0x0) at ../../gcc/gcc/cp/parser.c:8261 #22 0x00000000004fca76 in cp_parser_statement_seq_opt (parser=3D0x7ffff71bf= 688, in_statement_expr=3D0x0) at ../../gcc/gcc/cp/parser.c:8599 #23 0x00000000004fcbd0 in cp_parser_compound_statement (parser=3D0x7ffff71b= f688, in_statement_expr=3D0x0, in_try=3D, function_body=3D) at ../../gcc/gcc/cp/parser.c:8553 #24 0x000000000050e111 in cp_parser_function_body (parser=3D0x7ffff71bf688)= at ../../gcc/gcc/cp/parser.c:16881 #25 cp_parser_ctor_initializer_opt_and_function_body (parser=3D0x7ffff71bf6= 88) at ../../gcc/gcc/cp/parser.c:16918 #26 0x000000000050ea9b in cp_parser_function_definition_after_declarator (parser=3D0x7ffff71bf688, inline_p=3D0 '\000') at ../../gcc/gcc/cp/parser.c:20451 #27 0x000000000051109f in cp_parser_function_definition_from_specifiers_and_declarator (declarator=3D0x121f1f0, attributes=3D0x0, decl_specifiers=3D, parser=3D0x7ffff71bf688) at ../../gcc/gcc/cp/parser.c:20378 #28 cp_parser_init_declarator (parser=3D0x7ffff71bf688, decl_specifiers=3D, checks=3D0x0, function_definition_allowe= d_p=3D1 '\001', member_p=3D0 '\000', declares_class_or_enum=3D0, function_definition_p=3D0x7fffffffdbfb "\001", maybe_range_for_decl=3D0x0) at ../../gcc/gcc/cp/parser.c:14906 #29 0x000000000051157e in cp_parser_simple_declaration (parser=3D0x7ffff71b= f688, function_definition_allowed_p=3D1 '\001', maybe_range_for_decl=3D0x0) at ../../gcc/gcc/cp/parser.c:10008 #30 0x00000000005168a9 in cp_parser_block_declaration (statement_p=3D0 '\00= 0', parser=3D0x7ffff71bf688) at ../../gcc/gcc/cp/parser.c:9894 #31 cp_parser_block_declaration (parser=3D0x7ffff71bf688, statement_p=3D0 '= \000') at ../../gcc/gcc/cp/parser.c:9828 #32 0x000000000051ac28 in cp_parser_declaration (parser=3D0x7ffff71bf688) at ../../gcc/gcc/cp/parser.c:9799 #33 0x0000000000519416 in cp_parser_declaration_seq_opt (parser=3D0x7ffff71= bf688) at ../../gcc/gcc/cp/parser.c:9685 #34 0x000000000051b2a2 in cp_parser_translation_unit (parser=3D0x7ffff71bf6= 88) at ../../gcc/gcc/cp/parser.c:3469 #35 c_parse_file () at ../../gcc/gcc/cp/parser.c:26342 #36 0x00000000005a1ff5 in c_common_parse_file () at ../../gcc/gcc/c-family/c-opts.c:1110 #37 0x0000000000803e6c in compile_file () at ../../gcc/gcc/toplev.c:565 #38 do_compile () at ../../gcc/gcc/toplev.c:1930 #39 toplev_main (argc=3D12, argv=3D0x7fffffffdef8) at ../../gcc/gcc/toplev.= c:2006 #40 0x00007ffff767e405 in __libc_start_main (main=3D0x5b0580
, argc= =3D12, ubp_av=3D0x7fffffffdef8, init=3D, fini=3D, rtld_fini=3D, stack_end=3D0x7fffffffdee8) at libc-start.= c:226 #41 0x00000000004901c9 in _start () at ../sysdeps/x86_64/elf/start.S:113 (gdb)