From: Jason Merrill <jason@redhat.com>
To: Patrick Palka <ppalka@redhat.com>, gcc-patches@gcc.gnu.org
Cc: nathan@acm.org
Subject: Re: [PATCH] c++/modules: inline namespace abi_tag streaming [PR110730]
Date: Wed, 6 Mar 2024 20:31:45 -0500 [thread overview]
Message-ID: <bd54cebe-bd79-4cd3-ada9-84f5376cc7fe@redhat.com> (raw)
In-Reply-To: <20240306191042.1883372-1-ppalka@redhat.com>
On 3/6/24 14:10, Patrick Palka wrote:
> Tested on x86_64-pc-linux-gnu, does this look OK for trunk?
>
> -- >8 --
>
> The unreduced testcase from this PR crashes at runtime ultimately
> because we don't stream the abi_tag attribute on inline namespaces and
> so the filesystem::current_path() call resolves to the non-C++11 ABI
> version even though the C++11 ABI is active, leading to a crash when
> destructing the call result (which contains an std::string member).
>
> While we do stream the DECL_ATTRIBUTES of all decls that go through
> the generic tree streaming routines, it seems namespaces are streamed
> separately from other decls and we don't use the generic routines for
> them. So this patch makes us stream the abi_tag manually for (inline)
> namespaces.
Why not stream all DECL_ATTRIBUTES of all namespaces?
Jason
next prev parent reply other threads:[~2024-03-07 1:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 19:10 Patrick Palka
2024-03-07 1:31 ` Jason Merrill [this message]
2024-03-07 2:12 ` Patrick Palka
2024-03-07 20:37 ` Jason Merrill
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=bd54cebe-bd79-4cd3-ada9-84f5376cc7fe@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nathan@acm.org \
--cc=ppalka@redhat.com \
/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).