public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98741] New: [modules] ICE/SIGSEGV reading compiled module cluster
@ 2021-01-19  8:34 boris at kolpackov dot net
  2021-02-17 19:38 ` [Bug c++/98741] " nathan at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: boris at kolpackov dot net @ 2021-01-19  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98741
           Summary: [modules] ICE/SIGSEGV reading compiled module cluster
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris at kolpackov dot net
  Target Milestone: ---

Created attachment 49998
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49998&action=edit
Build transcript

The following simple module causes ICE/SIGSEGV:

// hello.mxx
export module hello;
import <string_view>;
export namespace hello
{
  void say_hello (const std::string_view& name);
}

// hello.cxx
module hello;
import <iostream>;
namespace hello
{
  void say_hello (const std::string_view& n)
  {
    std::cout << "Hello, " << n << '!' << std::endl;
  }
}

c++ ../../../tests/modules/gcc2/gcc-install/include/c++/11.0.0/h{string_view}
c++ ../../../tests/modules/gcc2/gcc-install/include/c++/11.0.0/h{iostream}
c++ mxx{hello}
c++ cxx{hello}
In module imported at
/home/boris/work/build2/cxx20-modules-examples/hello-module/hello/hello.mxx:2:1,
of module hello, imported at
/home/boris/work/build2/cxx20-modules-examples/hello-module/hello/hello.cxx:1:
/home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/string_view:
error: failed to read compiled module cluster 137: Bad file data
/home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/string_view:
note: compiled module file is
‘/home/boris/work/build2/cxx20-modules-examples/hello-module/build/cc/b
uild/modules/cxx/string_view-02af41185b22.gcm’
/home/boris/work/build2/tests/modules/gcc2/gcc-install/include/c++/11.0.0/string_view:
error: failed to read compiled module cluster 448: Bad file data
/home/boris/work/build2/cxx20-modules-examples/hello-module/hello/hello.cxx:5:30:
internal compiler error: Segmentation fault
0x180310b crash_signal
        ../../gcc/gcc/toplev.c:327
0xa16316 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:3451
0xc4a0b5 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
        ../../gcc/gcc/cp/module.cc:10733
0xc3bd06 trees_in::decl_value()
        ../../gcc/gcc/cp/module.cc:8004
0xc41e8a trees_in::tree_node(bool)
        ../../gcc/gcc/cp/module.cc:9219
0xc5cc39 module_state::read_cluster(unsigned int)
        ../../gcc/gcc/cp/module.cc:14896
0xc66826 module_state::load_section(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18036
0xc68a3c module_state::lazy_load(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18685
0xc44657 trees_in::tree_node(bool)
        ../../gcc/gcc/cp/module.cc:9730
0xc47cd8 trees_in::decl_container()
        ../../gcc/gcc/cp/module.cc:10346
0xc3bc3a trees_in::decl_value()
        ../../gcc/gcc/cp/module.cc:7992
0xc41e8a trees_in::tree_node(bool)
        ../../gcc/gcc/cp/module.cc:9219
0xc5cc39 module_state::read_cluster(unsigned int)
        ../../gcc/gcc/cp/module.cc:14896
0xc66826 module_state::load_section(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18036
0xc68a3c module_state::lazy_load(unsigned int, binding_slot*)
        ../../gcc/gcc/cp/module.cc:18685
0xc44657 trees_in::tree_node(bool)
        ../../gcc/gcc/cp/module.cc:9730
0xc42102 trees_in::tree_node(bool)
        ../../gcc/gcc/cp/module.cc:9269
0xc36133 trees_in::core_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:6624
0xc3810e trees_in::tree_node_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:7148
0xc3c012 trees_in::decl_value()
        ../../gcc/gcc/cp/module.cc:8043

The complete build transcript is attached.

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

end of thread, other threads:[~2021-03-04  7:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19  8:34 [Bug c++/98741] New: [modules] ICE/SIGSEGV reading compiled module cluster boris at kolpackov dot net
2021-02-17 19:38 ` [Bug c++/98741] " nathan at gcc dot gnu.org
2021-02-19 21:29 ` cvs-commit at gcc dot gnu.org
2021-02-19 21:30 ` nathan at gcc dot gnu.org
2021-03-04  7:48 ` boris at kolpackov dot net

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).