public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "chrisj at rtems dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/105880] eh_globals_init destructor not setting _M_init to false
Date: Wed, 08 Jun 2022 06:00:41 +0000 [thread overview]
Message-ID: <bug-105880-4-acNHjKjtEO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105880-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105880
--- Comment #4 from Chris Johns <chrisj at rtems dot org> ---
(In reply to Andrew Pinski from comment #3)
> Sounds like the order of deconstructors is wrong.
> Where is __cxxabiv1::__cxa_get_globals being called from that is the problem?
The `std::ios_base::Init::~Init()` is being called after this object has
destructed.
The ios_base class uses a sentry to check the state. The code in it's
destructor is:
if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())
The std::cerr object has ios_base::unitbuf set so uncaught_exception() is
called. This call gets the cxa globals:
__cxa_eh_globals *globals = __cxa_get_globals ();
next prev parent reply other threads:[~2022-06-08 6:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 5:19 [Bug libstdc++/105880] New: " chrisj at rtems dot org
2022-06-08 5:50 ` [Bug libstdc++/105880] " sebastian.huber@embedded-brains.de
2022-06-08 5:56 ` pinskia at gcc dot gnu.org
2022-06-08 5:58 ` pinskia at gcc dot gnu.org
2022-06-08 6:00 ` chrisj at rtems dot org [this message]
2022-06-08 6:04 ` pinskia at gcc dot gnu.org
2022-06-08 6:12 ` chrisj at rtems dot org
2022-06-08 9:00 ` redi at gcc dot gnu.org
2022-06-08 9:19 ` redi at gcc dot gnu.org
2022-06-08 9:49 ` redi at gcc dot gnu.org
2022-06-09 0:19 ` chrisj at rtems dot org
2022-06-09 9:07 ` redi at gcc dot gnu.org
2022-06-10 14:24 ` cvs-commit at gcc dot gnu.org
2022-06-10 14:27 ` redi at gcc dot gnu.org
2022-07-21 7:55 ` cvs-commit at gcc dot gnu.org
2022-07-21 8:58 ` redi at gcc dot gnu.org
2022-11-02 14:14 ` redi at gcc dot gnu.org
2022-11-02 14:55 ` rdiezmail-gcc at yahoo dot de
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-105880-4-acNHjKjtEO@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).