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

            Bug ID: 120014
           Summary: SIGSEGV ICE with modules related to instantiation of
                    templates across partition units (case 2)
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: miuna.oshino at gmail dot com
  Target Milestone: ---

Created attachment 61245
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61245&action=edit
Crash 2 project files + preprocessed source

Possible duplicate of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120013,
though this is a different error message.

> In all cases g++ crashes because of including certain std headers in `hewwo` 
> in the partition chain `hewwo -> uwu -> owo`.
> Many headers cause this, but we will use <chrono> as a scapegoat because it 
> is my sworn enemy
> 
> CRASH 2: `export import :uwu;` <https://godbolt.org/z/h3Te6G6cx>
> - `hewwo`: Variable with <chrono>
> - `uwu`:  Alias to DIFFERENT array **(no chrono)**
> - `owo`:  Variable of DIFFERENT array **(no chrono)**
> - Happens when `owo` does not have <chrono>.
> - Including <chrono> in `uwu` but NOT in `owo` changes the crash to `export 
> import :owo;` (passes through uwu without an issue)
> - Removing the instantiation of a different array symbol in `uwu` changes the 
> crash to `export import :owo;`.   (passes through uwu without an issue)
> - Including <chrono> in all 3 fixes it.
> - `export` or not doesn't change anything at all, on any of the 3 symbols
> - Maybe same as crash 1 but different context for diagnostics?

FAILED: CMakeFiles/meow.dir/meow.ixx.o CMakeFiles/meow.dir/meow.gcm
/usr/local/bin/g++   -std=c++20 -freport-bug -Wall -Wextra -pedantic -MD -MT
CMakeFiles/meow.dir/meow.ixx.o -MF CMakeFiles/meow.dir/meow.ixx.o.d
-fmodules-ts -fmodule-mapper=CMakeFiles/meow.dir/meow.ixx.o.modmap -MD
-fdeps-format=p1689r5 -x c++ -o CMakeFiles/meow.dir/meow.ixx.o -c
/home/miuna/dev/crash-2/meow.ixx
/home/miuna/dev/crash-2/meow.ixx:6:20: internal compiler error: Segmentation
fault
    6 | export import :uwu;
      |                    ^
0x22cc84f internal_error(char const*, ...)
        /home/miuna/dev/gcc/gcc/diagnostic-global-context.cc:517
0xfe115f crash_signal
        /home/miuna/dev/gcc/gcc/toplev.cc:322
0x7faed2dd932f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x78419a install_entity
        /home/miuna/dev/gcc/gcc/cp/module.cc:8109
0x78419a decl_value
        /home/miuna/dev/gcc/gcc/cp/module.cc:8657
0x8e8a94 tree_node
        /home/miuna/dev/gcc/gcc/cp/module.cc:10062
0x8ed09c module_state::read_cluster(unsigned int)
        /home/miuna/dev/gcc/gcc/cp/module.cc:16673
0x8edb67 module_state::load_section(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:20217
0x8f19cb module_state::read_language(bool)
        /home/miuna/dev/gcc/gcc/cp/module.cc:20146
0x8f1af8 module_state::read_language(bool)
        /home/miuna/dev/gcc/gcc/cp/module.cc:21206
0x8f1af8 direct_import
        /home/miuna/dev/gcc/gcc/cp/module.cc:21208
0x971a1e cp_parser_translation_unit
        /home/miuna/dev/gcc/gcc/cp/parser.cc:5434
0x971a1e c_parse_file()
        /home/miuna/dev/gcc/gcc/cp/parser.cc:53961
0xa7e561 c_common_parse_file()
        /home/miuna/dev/gcc/gcc/c-family/c-opts.cc:1379
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/cczVGCYu.out file, please attach this to
your bugreport.
ninja: build stopped: subcommand failed.
  • [Bug c++/120014] New: SIGSEGV I... miuna.oshino at gmail dot com via Gcc-bugs

Reply via email to