On 30/11/22 14:07, Jonathan Wakely wrote:
On Wed, 30 Nov 2022 at 11:57, Jonathan Wakely <jwak...@redhat.com> wrote:
On Wed, 30 Nov 2022 at 11:54, Jonathan Wakely <jwak...@redhat.com> wrote:
On Wed, 30 Nov 2022 at 06:04, François Dumont via Libstdc++
<libstd...@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.