public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jo.hiller+gcc at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110805] New: g++ crash on modules with exported class providing string constant with obscure content Date: Tue, 25 Jul 2023 16:27:19 +0000 [thread overview] Message-ID: <bug-110805-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110805 Bug ID: 110805 Summary: g++ crash on modules with exported class providing string constant with obscure content Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jo.hiller+gcc at gmail dot com Target Milestone: --- Created attachment 55630 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55630&action=edit output of -freport-bug // Info gcc-13 --version gcc-13 (Homebrew GCC 13.1.0) 13.1.0 macOS 13.5, arm64, Apple M1 MAX // Steps to reproduce * use a C++20 module with exported class providing obscure string constant * gcc 13.1 crash with "m.cc:3:8: internal compiler error: Segmentation fault: 11" // m.cc module; #include <string> export module m; export class Constants { public: inline static const std::string CONST_CRASH_1 = "Bundle-Activator"; }; // build gcc-13 -freport-bug -std=c++20 -xc++ -fmodules-ts -fmodule-only -Wall -Wextra m.cc # see attached output file ccRJ91Vu.out // notes * exported string constants outside exported class do work * string constants with different types/values do work as well, see different string value, very obscure static constexpr std::string_view CONST_OK_1 = "Bundle-Activator"; inline static const std::string CONST_OK_2 = "bundleactivator"; inline static const std::string CONST_OK_3 = "Bundle-Activato"; inline static const std::string CONST_OK_4 = "undle-Activator"; inline static const std::string CONST_OK_5 = "xxxXactivatorll"; * these string constants do fail as well inline static const std::string CONST_CRASH_2 = "xxxbundleXactivatorlll"; inline static const std::string CONST_CRASH_3 = "xxxXactivatorlll"; inline static const std::string CONST_CRASH_4 = "xxxXactivatorlll"; * it seems this pattern ".*.activator.*" triggeres special handling in gcc-13, lower/upper case seems not to be relevant, but number of characters before/after
next reply other threads:[~2023-07-25 16:27 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-25 16:27 jo.hiller+gcc at gmail dot com [this message] 2023-08-01 16:52 ` [Bug c++/110805] " jo.hiller+gcc at gmail dot com 2023-08-01 17:33 ` pinskia at gcc dot gnu.org 2023-08-01 17:38 ` jo.hiller+gcc at gmail dot com 2024-03-06 20:24 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-110805-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).