public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100129] New: [modules] ICE free(): invalid pointer
@ 2021-04-17  6:48 alexander.lelyakin at googlemail dot com
  2021-12-29 21:44 ` [Bug c++/100129] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-04-17  6:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100129
           Summary: [modules] ICE free(): invalid pointer
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header execution
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header limits
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header unordered_set
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header stack
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header condition_variable
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header future
----
free(): invalid pointer
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
----
g++ (GCC) 11.0.1 20210416 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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

* [Bug c++/100129] [modules] ICE free(): invalid pointer
  2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
@ 2021-12-29 21:44 ` pinskia at gcc dot gnu.org
  2021-12-30  0:19 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |GC, ice-on-valid-code

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
apinski@xeond:~/src/pr100129$ g++ --param=hash-table-verification-limit=1000
-std=c++20 -fmodules-ts -x c++-system-header condition_variable
apinski@xeond:~/src/pr100129$ g++ --param=hash-table-verification-limit=1000
-std=c++20 -fmodules-ts -x c++-system-header future
free(): invalid pointer
malloc(): memory corruption (fast)
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.


Is enough to reproduce the failure.

#0  __memset_avx2_erms () at
../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:145
#1  0x0000000000cda0fa in clear_marks() () at
/home/apinski/src/upstream-gcc/gcc/gcc/ggc-page.c:1901
#2  0x0000000000cdb6bd in ggc_collect(ggc_collect) () at
/home/apinski/src/upstream-gcc/gcc/gcc/ggc-page.c:2226
#3  0x0000000000bf2477 in expand_or_defer_fn_1(tree_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/semantics.c:4707
#4  0x0000000000bf2579 in expand_or_defer_fn(tree_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/semantics.c:4779
#5  0x0000000000b6d448 in
cp_parser_function_definition_after_declarator(cp_parser*, bool) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:31188
#6  0x0000000000b6d8cd in cp_parser_late_parsing_for_member(cp_parser*,
tree_node*) () at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:32096
#7  0x0000000000b4632c in cp_parser_class_specifier_1(cp_parser*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:26116
#8  0x0000000000b4731f in cp_parser_class_specifier (parser=<error reading
variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:26140
#9  cp_parser_type_specifier(cp_parser*, int, cp_decl_specifier_seq*, bool,
int*, bool*) () at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:19293
#10 0x0000000000b48274 in cp_parser_decl_specifier_seq(cp_parser*, int,
cp_decl_specifier_seq*, int*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:15856
#11 0x0000000000b75db7 in cp_parser_single_declaration(cp_parser*,
vec<deferred_access_check, va_gc, vl_embed>*, bool, bool, bool*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:31580
#12 0x0000000000b76217 in
cp_parser_template_declaration_after_parameters(cp_parser*, tree_node*, bool)
() at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:31243
#13 0x0000000000b76aa1 in cp_parser_explicit_template_declaration(cp_parser*,
bool) () at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:31509
#14 0x0000000000b77228 in cp_parser_template_declaration_after_export
(member_p=<optimized out>, parser=<optimized out>) at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:31528
#15 cp_parser_template_declaration(cp_parser*, bool) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:17407
#16 0x0000000000b79452 in cp_parser_declaration(cp_parser*, tree_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14849
#17 0x0000000000b789fa in cp_parser_toplevel_declaration
(parser=0x7ffff6d3a000) at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14939
#18 cp_parser_declaration_seq_opt (parser=parser@entry=0x7ffff6d3a000) at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14692
#19 0x0000000000b78e65 in cp_parser_namespace_body (parser=<error reading
variable: dwarf2_find_location_expression: Corrupted DWARF expression.>) at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:21323
#20 cp_parser_namespace_definition(cp_parser*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:21301
#21 0x0000000000b79588 in cp_parser_declaration(cp_parser*, tree_node*) () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14898
#22 0x0000000000b79f03 in cp_parser_toplevel_declaration
(parser=0x7ffff6d3a000) at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:14939
#23 cp_parser_translation_unit (parser=0x7ffff6d3a000, parser@entry=<error
reading variable: dwarf2_find_location_expression: Corrupted DWARF
expression.>) at /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:4987
#24 c_parse_file() () at
/home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:47946
#25 0x0000000000caa8de in c_common_parse_file () at
/home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-opts.c:1238
#26 0x00000000011e752e in compile_file () at
/home/apinski/src/upstream-gcc/gcc/gcc/toplev.c:452
#27 0x00000000009bed04 in do_compile (no_backend=false) at
/home/apinski/src/upstream-gcc/gcc/gcc/toplev.c:2158
#28 toplev::main(int, char**) () at
/home/apinski/src/upstream-gcc/gcc/gcc/toplev.c:2310
#29 0x00000000009c041b in main (argc=21, argv=0x7fffffffdd58) at
/home/apinski/src/upstream-gcc/gcc/gcc/main.c:39

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

* [Bug c++/100129] [modules] ICE free(): invalid pointer
  2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
  2021-12-29 21:44 ` [Bug c++/100129] " pinskia at gcc dot gnu.org
@ 2021-12-30  0:19 ` pinskia at gcc dot gnu.org
  2021-12-30  4:42 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30  0:19 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Trying to reduce this.

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

* [Bug c++/100129] [modules] ICE free(): invalid pointer
  2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
  2021-12-29 21:44 ` [Bug c++/100129] " pinskia at gcc dot gnu.org
  2021-12-30  0:19 ` pinskia at gcc dot gnu.org
@ 2021-12-30  4:42 ` pinskia at gcc dot gnu.org
  2021-12-30  7:11 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30  4:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Add --param=ggc-min-expand=1 we get:
hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /home/apinski/upstream-gcc/include/c++/12.0.0/future:44:
/home/apinski/upstream-gcc/include/c++/12.0.0/bits/atomic_futex.h:76:5:
internal compiler error: in hashtab_chk_error, at hash-table.c:137
   76 |     atomic<unsigned> _M_data;
      |     ^~~~~~
0x9bab97 hashtab_chk_error()
        /home/apinski/src/upstream-gcc/gcc/gcc/hash-table.c:137
0xbd7e85 hash_table<spec_hasher, false, xcallocator>::verify(spec_entry*
const&, unsigned int)
        /home/apinski/src/upstream-gcc/gcc/gcc/hash-table.h:1036
0xbd840c hash_table<spec_hasher, false,
xcallocator>::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
        /home/apinski/src/upstream-gcc/gcc/gcc/hash-table.h:971
0xb93d0b match_mergeable_specialization(bool, spec_entry*)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.c:30400
0xb0531c trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/module.cc:10683
0xb0925e trees_in::decl_value()
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/module.cc:7911
0xb02147 trees_in::tree_node(bool)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/module.cc:9164
0xb0864b module_state::read_cluster(unsigned int)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/module.cc:14830
0xb08be5 module_state::load_section(unsigned int, binding_slot*)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/module.cc:18101
0xb08d9e lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/module.cc:18792
0xb1abed name_lookup::search_namespace_only(tree_node*)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/name-lookup.c:927
0xb1c0f3 name_lookup::search_unqualified(tree_node*, cp_binding_level*)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/name-lookup.c:1157
0xb1de2d lookup_name(tree_node*, LOOK_where, LOOK_want)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/name-lookup.c:7739
0xb2f229 lookup_name(tree_node*, LOOK_want)
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/name-lookup.h:401
0xb2f229 cp_parser_lookup_name
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:30528
0xb5adf8 cp_parser_template_name
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:18539
0xb5b409 cp_parser_template_id
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:18143
0xb5bd6b cp_parser_class_name
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:25640
0xb5271e cp_parser_qualifying_entity
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:7061
0xb5271e cp_parser_nested_name_specifier_opt
        /home/apinski/src/upstream-gcc/gcc/gcc/cp/parser.c:6743
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

I am going to assume this is the same bug when I reducing it but if it is not
then I will deal with it later.

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

* [Bug c++/100129] [modules] ICE free(): invalid pointer
  2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
                   ` (2 preceding siblings ...)
  2021-12-30  4:42 ` pinskia at gcc dot gnu.org
@ 2021-12-30  7:11 ` pinskia at gcc dot gnu.org
  2021-12-30 16:10 ` pinskia at gcc dot gnu.org
  2021-12-30 16:12 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30  7:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It is Looking tuple/template parameter pack/specialization related.

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

* [Bug c++/100129] [modules] ICE free(): invalid pointer
  2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
                   ` (3 preceding siblings ...)
  2021-12-30  7:11 ` pinskia at gcc dot gnu.org
@ 2021-12-30 16:10 ` pinskia at gcc dot gnu.org
  2021-12-30 16:12 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 99479.

*** This bug has been marked as a duplicate of bug 99479 ***

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

* [Bug c++/100129] [modules] ICE free(): invalid pointer
  2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
                   ` (4 preceding siblings ...)
  2021-12-30 16:10 ` pinskia at gcc dot gnu.org
@ 2021-12-30 16:12 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30 16:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100129
Bug 100129 depends on bug 99861, which changed state.

Bug 99861 Summary: [modules] ICE in hashtab_chk_error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

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

end of thread, other threads:[~2021-12-30 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-17  6:48 [Bug c++/100129] New: [modules] ICE free(): invalid pointer alexander.lelyakin at googlemail dot com
2021-12-29 21:44 ` [Bug c++/100129] " pinskia at gcc dot gnu.org
2021-12-30  0:19 ` pinskia at gcc dot gnu.org
2021-12-30  4:42 ` pinskia at gcc dot gnu.org
2021-12-30  7:11 ` pinskia at gcc dot gnu.org
2021-12-30 16:10 ` pinskia at gcc dot gnu.org
2021-12-30 16:12 ` pinskia 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).