public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "egor.pugin at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/99243] [modules] ICE in set_filename, at cp/module.cc:19143
Date: Fri, 16 Sep 2022 09:41:54 +0000	[thread overview]
Message-ID: <bug-99243-4-uk1QeGwRGd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99243-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Egor Pugin <egor.pugin at gmail dot com> ---
Possible naive fix is to change in module.cc (void module_state::set_filename
(const Cody::Packet &packet)):

-      error_at (loc, "unknown Compiled Module Interface: %s",
                packet.GetString ().c_str ());
+      fatal_error (loc, "unknown Compiled Module Interface: %s",
                packet.GetString ().c_str ());

If we do not fail here, tons of ICEs come later because other code does not
expect such mismatches. (There can be communication error, so we do not get
same number of packets sent about querying modules, or another error.)

For example, the following function

static void
name_pending_imports (cpp_reader *reader)

iterates over responses and does not check for r_iter == response.end()

              module->set_filename (*r_iter);
              ++r_iter;

      parent reply	other threads:[~2022-09-16  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  8:44 [Bug c++/99243] New: internal compiler error: " alexander.lelyakin at googlemail dot com
2021-03-27  6:53 ` [Bug c++/99243] [modules] ICE " alexander.lelyakin at googlemail dot com
2022-02-11 13:40 ` egor.pugin at gmail dot com
2022-09-16  9:33 ` redi at gcc dot gnu.org
2022-09-16  9:34 ` redi at gcc dot gnu.org
2022-09-16  9:41 ` egor.pugin at gmail dot com [this message]

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-99243-4-uk1QeGwRGd@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: link
Be 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).