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

            Bug ID: 120016
           Summary: SIGSEGV ICE with modules related to instantiation of
                    templates across partition units (case 3)
           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 61246
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61246&action=edit
Crash 3 project files + preprocessed source

Possible duplicate of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120013 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120014, though this is a different
crash 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 3: some iterator stuff <https://godbolt.org/z/oa1T1MfG5>
> - `hewwo`: Variable with <chrono>
> - `uwu`: Alias to DIFFERENT array **(no chrono)**
> - `owo`: **NOTHING**, but WITH <chrono>
> - Including <chrono> in all 3 fixes it.
> - Eerily similar again, wondering if it's just the same issue
> - **This one does give some information**

FAILED: CMakeFiles/meow.dir/owo.ixx.o CMakeFiles/meow.dir/meow-owo.gcm
/usr/local/bin/g++   -std=c++20 -freport-bug -Wall -Wextra -pedantic -MD -MT
CMakeFiles/meow.dir/owo.ixx.o -MF CMakeFiles/meow.dir/owo.ixx.o.d -fmodules-ts
-fmodule-mapper=CMakeFiles/meow.dir/owo.ixx.o.modmap -MD -fdeps-format=p1689r5
-x c++ -o CMakeFiles/meow.dir/owo.ixx.o -c /home/miuna/dev/crash-3/owo.ixx
In file included from /usr/local/include/c++/15.1.0/bits/stl_algobase.h:65,
                 from /usr/local/include/c++/15.1.0/array:45,
                 from /home/miuna/dev/crash-3/owo.ixx:3:
/usr/local/include/c++/15.1.0/bits/stl_iterator_base_types.h: In substitution
of ‘template<class _InIter> using std::_RequireInputIter =
std::__enable_if_t<((bool)std::is_convertible<typename
std::iterator_traits<_Iterator>::iterator_category,
std::input_iterator_tag>::value)> [with _InIter = char*]’:
/usr/local/include/c++/15.1.0/bits/basic_string.h:847:9:   required by
substitution of ‘template<class _InputIterator, class> constexpr
std::__cxx11::basic_string<char>::basic_string(_InputIterator, _InputIterator,
const std::allocator<char>&) [with _InputIterator = char*;
<template-parameter-1-2> = <missing>]’
  847 |                typename = std::_RequireInputIter<_InputIterator>>
      |                ^~~~~~~~
/usr/local/include/c++/15.1.0/ext/string_conversions.h:119:14:   required from
‘_String __gnu_cxx::__to_xstring(int (*)(_CharT*, std::size_t, const _CharT*,
__va_list_tag*), std::size_t, const _CharT*, ...) [with _String =
std::__cxx11::basic_string<char>; _CharT = char; std::size_t = long unsigned
int]’
  119 |       return _String(__s, __s + __len);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/15.1.0/bits/basic_string.h:4697:43:   required from here
 4697 |     return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
 4698 |                                            "%f", __val);
      |                                            ~~~~~~~~~~~~
/usr/local/include/c++/15.1.0/bits/stl_iterator_base_types.h:254:57: internal
compiler error: Segmentation fault
  254 |                                    input_iterator_tag>::value>;
      |                                                         ^~~~~
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
0x7f8e4356032f ???
        ./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
0x8edc1e module_state::lazy_load(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:21063
0x8e98d9 tree_node
        /home/miuna/dev/gcc/gcc/cp/module.cc:10629
0x8ed02b module_state::read_cluster(unsigned int)
        /home/miuna/dev/gcc/gcc/cp/module.cc:16528
0x8edb67 module_state::load_section(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:20217
0x8edc1e module_state::lazy_load(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:21063
0x8e98d9 tree_node
        /home/miuna/dev/gcc/gcc/cp/module.cc:10629
0x8ed02b module_state::read_cluster(unsigned int)
        /home/miuna/dev/gcc/gcc/cp/module.cc:16528
0x8edb67 module_state::load_section(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:20217
0x8edc1e module_state::lazy_load(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:21063
0x8e98d9 tree_node
        /home/miuna/dev/gcc/gcc/cp/module.cc:10629
0x8ed02b module_state::read_cluster(unsigned int)
        /home/miuna/dev/gcc/gcc/cp/module.cc:16528
0x8edb67 module_state::load_section(unsigned int, binding_slot*)
        /home/miuna/dev/gcc/gcc/cp/module.cc:20217
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/ccCpZmZP.out file, please attach this to
your bugreport.
ninja: build stopped: subcommand failed.
  • [Bug c++/120016] New: SIGSEGV I... miuna.oshino at gmail dot com via Gcc-bugs

Reply via email to