[Bug c++/99737] [modules] malloc(): smallbin double linked list corrupted

alexander.lelyakin at googlemail dot com gcc-bugzilla@gcc.gnu.org
Thu Apr 1 05:30:12 GMT 2021


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

--- Comment #4 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
Today's sequence is:
----
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header tuple
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header set
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem
----
Repeatedly running this sequence i have found that it produces little different
error messages every time. 
----1
corrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
                 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
                 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:1851:34: internal compiler
error: Aborted
 1851 |     : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
      |                                  ^~~~~~~~~~~~~~~~~~~~~
0x110a6ff crash_signal
        ../../gcc/gcc/toplev.c:327
0x1d549f4 xcalloc
        ../../gcc/libiberty/xmalloc.c:162
0xae35f6 xcallocator<tree_node*>::data_alloc(unsigned long)
        ../../gcc/gcc/hash-table.h:275
0xae35f6 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::alloc_entries(unsigned long) const
        ../../gcc/gcc/hash-table.h:711
0xae35f6 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)
        ../../gcc/gcc/hash-table.h:628
0xae3d50 hash_set<tree_node*, false, default_hash_traits<tree_node*>
>::hash_set(unsigned long, bool)
        ../../gcc/gcc/hash-set.h:41
0xae3d50 for_each_template_parm
        ../../gcc/gcc/cp/pt.c:10564
0xac06cc cp_parser_type_id_1
        ../../gcc/gcc/cp/parser.c:23221
0xac2be3 cp_parser_template_type_arg
        ../../gcc/gcc/cp/parser.c:23275
0xac2d0f cp_parser_template_argument
        ../../gcc/gcc/cp/parser.c:17915
0xac2d0f cp_parser_template_argument_list
        ../../gcc/gcc/cp/parser.c:17826
0xac2d0f cp_parser_enclosed_template_argument_list
        ../../gcc/gcc/cp/parser.c:30799
0xac4066 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17398
0xac47fb cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24692
0xabbcaa cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:7002
0xabbcaa cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:6684
0xaaf80c cp_parser_base_specifier
        ../../gcc/gcc/cp/parser.c:26711
0xaaf80c cp_parser_base_clause
        ../../gcc/gcc/cp/parser.c:26564
0xaaf80c cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:25651
0xaaf80c cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:24814
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

----2
corrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
                 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
                 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:1851:52: internal compiler
error: Aborted
 1851 |     : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
      |                                                    ^~~
0x110a6ff crash_signal
        ../../gcc/gcc/toplev.c:327
0x1d549f4 xcalloc
        ../../gcc/libiberty/xmalloc.c:162
0x13f3fd9 xcallocator<tree_node*>::data_alloc(unsigned long)
        ../../gcc/gcc/hash-table.h:275
0x13f3fd9 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::alloc_entries(unsigned long) const
        ../../gcc/gcc/hash-table.h:711
0x13f3fd9 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)
        ../../gcc/gcc/hash-table.h:628
0x13f3fd9 hash_set<tree_node*, false, default_hash_traits<tree_node*>
>::hash_set(unsigned long, bool)
        ../../gcc/gcc/hash-set.h:41
0x13f3fd9 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false,
default_hash_traits<tree_node*> >*))
        ../../gcc/gcc/tree.c:12474
0xaf4b99 instantiation_dependent_uneval_expression_p(tree_node*)
        ../../gcc/gcc/cp/pt.c:27494
0xaf4b99 instantiation_dependent_expression_p(tree_node*)
        ../../gcc/gcc/cp/pt.c:27504
0x982285 is_nondependent_constant_expression(tree_node*)
        ../../gcc/gcc/cp/constexpr.c:8960
0x982285 is_nondependent_constant_expression(tree_node*)
        ../../gcc/gcc/cp/constexpr.c:8956
0x98308f maybe_constant_value(tree_node*, tree_node*, bool)
        ../../gcc/gcc/cp/constexpr.c:7432
0xb23c0c convert_nontype_argument
        ../../gcc/gcc/cp/pt.c:7274
0xb23c0c convert_template_argument
        ../../gcc/gcc/cp/pt.c:8508
0xb259c3 coerce_template_parms
        ../../gcc/gcc/cp/pt.c:8987
0xb286d9 lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:9825
0xb2a47c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:10211
0xb5285b finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:3563
0xac460b cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17465
0xac47fb cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24692
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

----3
orrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
                 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
                 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:1851:55: internal compiler
error: Aborted
 1851 |     : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
      |                                                       ^~
0x110a6ff crash_signal
        ../../gcc/gcc/toplev.c:327
0x1d549f4 xcalloc
        ../../gcc/libiberty/xmalloc.c:162
0x13f3fd9 xcallocator<tree_node*>::data_alloc(unsigned long)
        ../../gcc/gcc/hash-table.h:275
0x13f3fd9 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::alloc_entries(unsigned long) const
        ../../gcc/gcc/hash-table.h:711
0x13f3fd9 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)
        ../../gcc/gcc/hash-table.h:628
0x13f3fd9 hash_set<tree_node*, false, default_hash_traits<tree_node*>
>::hash_set(unsigned long, bool)
        ../../gcc/gcc/hash-set.h:41
0x13f3fd9 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false,
default_hash_traits<tree_node*> >*))
        ../../gcc/gcc/tree.c:12474
0x95af46 inherit_targ_abi_tags(tree_node*)
        ../../gcc/gcc/cp/class.c:1669
0xb28e09 lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:10197
0xb2a47c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:10211
0xb5285b finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:3563
0xac460b cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17465
0xac47fb cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24692
0xabbcaa cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:7002
0xabbcaa cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:6684
0xaaf80c cp_parser_base_specifier
        ../../gcc/gcc/cp/parser.c:26711
0xaaf80c cp_parser_base_clause
        ../../gcc/gcc/cp/parser.c:26564
0xaaf80c cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:25651
0xaaf80c cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:24814
0xaaff83 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:25193
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

----4
malloc(): smallbin double linked list corrupted
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
                 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
                 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
                 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h: In destructor
‘std::__allocated_ptr<_Alloc>::~__allocated_ptr()’:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:73:32: internal compiler
error: Aborted
   73 |           std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr,
1);
      |                                ^
0x110a6ff crash_signal
        ../../gcc/gcc/toplev.c:327
0x1d54a40 xrealloc
        ../../gcc/libiberty/xmalloc.c:179
0xa94bcd void va_heap::reserve<cp_token*>(vec<cp_token*, va_heap, vl_embed>*&,
unsigned int, bool)
        ../../gcc/gcc/vec.h:290
0xa94bcd vec<cp_token*, va_heap, vl_ptr>::reserve(unsigned int, bool)
        ../../gcc/gcc/vec.h:1778
0xa94bcd vec<cp_token*, va_heap, vl_ptr>::safe_push(cp_token* const&)
        ../../gcc/gcc/vec.h:1887
0xa94bcd cp_lexer_save_tokens
        ../../gcc/gcc/cp/parser.c:1241
0xa94bcd cp_parser_parse_tentatively
        ../../gcc/gcc/cp/parser.c:32847
0xac4c7d cp_parser_type_name
        ../../gcc/gcc/cp/parser.c:19219
0xad16d6 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:18924
0xaaff1d cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18516
0xac1f73 cp_parser_type_specifier_seq
        ../../gcc/gcc/cp/parser.c:23367
0xac05f4 cp_parser_type_id_1
        ../../gcc/gcc/cp/parser.c:23170
0xac2be3 cp_parser_template_type_arg
        ../../gcc/gcc/cp/parser.c:23275
0xac2d0f cp_parser_template_argument
        ../../gcc/gcc/cp/parser.c:17915
0xac2d0f cp_parser_template_argument_list
        ../../gcc/gcc/cp/parser.c:17826
0xac2d0f cp_parser_enclosed_template_argument_list
        ../../gcc/gcc/cp/parser.c:30799
0xac4066 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17398
0xac47fb cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24692
0xabbcaa cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:7002
0xabbcaa cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:6684
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

----5
corrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
                 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
                 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:1851:47: internal compiler
error: Aborted
 1851 |     : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
      |                                               ^~~
0x110a6ff crash_signal
        ../../gcc/gcc/toplev.c:327
0x1d549f4 xcalloc
        ../../gcc/libiberty/xmalloc.c:162
0xae35f6 xcallocator<tree_node*>::data_alloc(unsigned long)
        ../../gcc/gcc/hash-table.h:275
0xae35f6 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::alloc_entries(unsigned long) const
        ../../gcc/gcc/hash-table.h:711
0xae35f6 hash_table<default_hash_traits<tree_node*>, false,
xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)
        ../../gcc/gcc/hash-table.h:628
0xae3d50 hash_set<tree_node*, false, default_hash_traits<tree_node*>
>::hash_set(unsigned long, bool)
        ../../gcc/gcc/hash-set.h:41
0xae3d50 for_each_template_parm
        ../../gcc/gcc/cp/pt.c:10564
0xac06cc cp_parser_type_id_1
        ../../gcc/gcc/cp/parser.c:23221
0xac2be3 cp_parser_template_type_arg
        ../../gcc/gcc/cp/parser.c:23275
0xac2d0f cp_parser_template_argument
        ../../gcc/gcc/cp/parser.c:17915
0xac2d0f cp_parser_template_argument_list
        ../../gcc/gcc/cp/parser.c:17826
0xac2d0f cp_parser_enclosed_template_argument_list
        ../../gcc/gcc/cp/parser.c:30799
0xac4066 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:17398
0xac47fb cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:24692
0xabbcaa cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:7002
0xabbcaa cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:6684
0xad1554 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:18858
0xaaff1d cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18516
0xac1f73 cp_parser_type_specifier_seq
        ../../gcc/gcc/cp/parser.c:23367
0xac05f4 cp_parser_type_id_1
        ../../gcc/gcc/cp/parser.c:23170
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


More information about the Gcc-bugs mailing list