public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "François Dumont" <frs.dumont@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "Björn Schäpers" <gcc@hazardy.de>,
	libstdc++@gcc.gnu.org, "gcc Patches" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: Add error handler for <stacktrace>
Date: Wed, 30 Nov 2022 19:17:15 +0100	[thread overview]
Message-ID: <a45fa28a-ecfc-c0e5-44cb-117c8c23c588@gmail.com> (raw)
In-Reply-To: <CACb0b4=Q68rqxPus-mSxD6MyxTuX_T_5M5=oxgEy_rGozKFbvA@mail.gmail.com>

On 30/11/22 14:07, Jonathan Wakely wrote:
> On Wed, 30 Nov 2022 at 11:57, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>>
>> On Wed, 30 Nov 2022 at 11:54, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>
>>>
>>> On Wed, 30 Nov 2022 at 06:04, François Dumont via Libstdc++ <libstdc++@gcc.gnu.org> wrote:
>>>> Good catch, then we also need this patch.
>>>
>>> Is it worth printing an error? If we can't show the backtrace because of an error, we can just print nothing there.
>>>
>>> We also need to pass an error handler to the __glibcxx_backtrace_create_state call in formatter.h.
>>>
>>> Now that I look at this code again, why do we need the _M_backtrace_full member? It's always set to the same thing, why can't we just call that function directly?
>>
>> Oh right, I remember now ... because otherwise the libstdc++.so library needs the definition of __glibcxx_backtrace_full.
> I'm testing the attached patch.
>
>
>>> And I think we should use threaded=1 for the __glibcxx_backtrace_create_state call.

You mean that 2 threads could try to assert at the same time.

I don't know what's the rule on the static _Error_formatter instance in 
_S_at. If we have a strong guaranty that only 1 instance will be created 
then I understand why we need threaded=1. Even if in this case the 2 
threads will report the same stacktrace.



  parent reply	other threads:[~2022-11-30 18:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 21:41 Björn Schäpers
2022-11-30  6:04 ` François Dumont
2022-11-30 11:54   ` Jonathan Wakely
2022-11-30 11:57     ` Jonathan Wakely
2022-11-30 13:07       ` Jonathan Wakely
2022-11-30 18:00         ` François Dumont
2022-12-06 21:44           ` Jonathan Wakely
2022-12-07 17:58             ` François Dumont
2022-12-07 20:06               ` Jonathan Wakely
2022-11-30 18:17         ` François Dumont [this message]
2022-11-30 19:20   ` Björn Schäpers
2022-11-30 12:31 ` Jonathan Wakely
2022-11-30 13:05   ` Jonathan Wakely

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=a45fa28a-ecfc-c0e5-44cb-117c8c23c588@gmail.com \
    --to=frs.dumont@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@hazardy.de \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).