https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #59 from LIU Hao ---
Created attachment 59642
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59642&action=edit
proposed patch for MCF thread model
Partly fix this issue for the MCF thread model.
Partly do some cleanup for the n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #58 from Iain Sandoe ---
As far as I can tell, (at least on targets with TLS support) since the
variables __once_callable and __once_call have a single instance per thread,
the current implementation does not support nested once_call(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #57 from GCC Commits ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
:
https://gcc.gnu.org/g:415457babf04d077929956ea97132448b0dc4b2c
commit r12-10226-g415457babf04d077929956ea97132448b0dc4b2c
Author: Jonathan Wak
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #56 from GCC Commits ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
:
https://gcc.gnu.org/g:a2c960dd7ebe2db0e8153a7e691245a4928341c6
commit r13-8464-ga2c960dd7ebe2db0e8153a7e691245a4928341c6
Author: Jonathan Wake
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #55 from GCC Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:e6836bbbd7a01af0791c02087e568b4822418c0d
commit r14-9467-ge6836bbbd7a01af0791c02087e568b4822418c0d
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #54 from Jonathan Wakely ---
Because it would be an ABI break. It's a good option if backwards compatibility
is not required, I've suggested it before.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
LIU Hao changed:
What|Removed |Added
CC||lh_mouse at 126 dot com
--- Comment #53 from L
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #52 from Jonathan Wakely ---
*** Bug 104495 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
CC||f.heckenb...@fh-soft.de
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Richard Biener changed:
What|Removed |Added
Target Milestone|11.2|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|11.0|11.2
--- Comment #50 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Assignee|redi at gcc dot gnu.org|unassigned at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #49 from Jonathan Wakely ---
Looks like you didn't rebuild something properly. The __once_functor symbol
should not have changed at all.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
cqwrteur changed:
What|Removed |Added
CC||unlvsur at live dot com
--- Comment #48 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #47 from CVS Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:6ee24638ed0ad51e568c799bacf149ba9bd7628b
commit r11-7688-g6ee24638ed0ad51e568c799bacf149ba9bd7628b
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #46 from Rich Felker ---
It's a standard and completely reasonable assumption that, if you statically
linked libstdc++ into your shared library, the copy there is for *internal use
only* and cannot share objects of the standard librar
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #45 from Florian Weimer ---
Statically linking libstdc++ into shared objects is also not too uncommon.
With luck, the libstdc++ symbols are hidden, but operating on globally shared
across multiple libstdc++s exposes similar issues ev
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #44 from Rich Felker ---
Uhg. I don't know what kind of retroactive fix for that is possible, if any,
but going forward this kind of thing (assumptions that impose ABI boundaries)
should not be inlined by the template. It should just
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #43 from Jonathan Wakely ---
(In reply to Rich Felker from comment #42)
> I'm confused why this is an ABI boundary at all. Was the old implementation
> of std::call_once being inlined into callers?
Yes, it's a function template:
htt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #42 from Rich Felker ---
I'm confused why this is an ABI boundary at all. Was the old implementation of
std::call_once being inlined into callers? Otherwise all code operating on the
same once object should be using a common implement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #41 from Jonathan Wakely ---
The new std::call_once using a futex is not backwards compatible, so I think it
needs to be reverted, or hidden behind an ABI-breaking flag.
The new std::once_flag::_M_activate() function sets _M_once=1 w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #40 from Jonathan Wakely ---
(In reply to Libor Bukata from comment #39)
> (In reply to Libor Bukata from comment #38)
> > (In reply to Jonathan Wakely from comment #34)
> > > Untested sketch of a solution for Solaris and BSDs:
> > >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #39 from Libor Bukata ---
(In reply to Libor Bukata from comment #38)
> (In reply to Jonathan Wakely from comment #34)
> > Untested sketch of a solution for Solaris and BSDs:
> > https://gcc.gnu.org/pipermail/gcc-patches/2020-November
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Libor Bukata changed:
What|Removed |Added
CC||libor.bukata at oracle dot com
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #37 from CVS Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:9f9dbc8e09cf48406aa24b6c78735f1a7912cc4e
commit r11-6229-g9f9dbc8e09cf48406aa24b6c78735f1a7912cc4e
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #36 from Jonathan Wakely ---
Attribute unused, not attribute used.
I'll fix it shortly.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Thomas Schwinge changed:
What|Removed |Added
CC||tschwinge at gcc dot gnu.org
--- Comme
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #34 from Jonathan Wakely ---
Untested sketch of a solution for Solaris and BSDs:
https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557928.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #33 from Jonathan Wakely ---
Fixed for linux targets, not others though.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Bug 66146 depends on bug 84323, which changed state.
Bug 84323 Summary: call_once uses TLS even when once_flag is set
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84323
What|Removed |Added
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #32 from CVS Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:93e79ed391b9c636f087e6eb7e70f14963cd10ad
commit r11-4691-g93e79ed391b9c636f087e6eb7e70f14963cd10ad
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|--- |11.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Evgeny changed:
What|Removed |Added
CC||kisha-nik at mail dot ru
--- Comment #31 from E
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|10.2|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Peter Dimov changed:
What|Removed |Added
CC||pdimov at gmail dot com
--- Comment #30 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|10.0|10.2
--- Comment #29 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
CC||mariogalindoq at hotmail dot
com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #27 from Jonathan Wakely ---
Yes, we need to reimplement call_once to not use pthread_once at all, for any
targets.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #26 from Paul Adobe ---
It may be interesting to note that we recently ended up tracking a change in
glibc to making this a problem on x86_64 architectures. Apparently when they
refactored pthread_once in glibc patch 2.17.288 it chang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|9.2 |10.0
--- Comment #25 from Jonathan Wak
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #24 from Jon Cohen ---
I don't see anything in the release notes about call_once. Is this still an
open issue?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jakub Jelinek changed:
What|Removed |Added
Target Milestone|9.0 |9.2
--- Comment #23 from Jakub Jelinek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|--- |9.0
--- Comment #22 from Jonathan Wake
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jon Cohen changed:
What|Removed |Added
CC||cohenjon at google dot com
--- Comment #21 f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #20 from Jonathan Wakely ---
(In reply to Anthony Williams from comment #16)
> Would it be worth ignoring pthread_once and using an implementation of
> call_once based on Mike Burrows' algorithm?
>
> http://www.open-std.org/jtc1/sc22
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
CC||simon.heybrock at esss dot se
--- Comm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #18 from Jonathan Wakely ---
*** Bug 71025 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
nsz at gcc dot gnu.org changed:
What|Removed |Added
CC||nsz at gcc dot gnu.org
--- Comme
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #16 from Anthony Williams ---
Would it be worth ignoring pthread_once and using an implementation of
call_once based on Mike Burrows' algorithm?
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
nsz at gcc dot gnu.org changed:
What|Removed |Added
CC||anthony.ajw at gmail dot com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #17 from Jonathan Wakely ---
Yes, I think we need to do that, because even if glibc were to change that
wouldn't help on non-gnu targets.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #15 from Jonathan Wakely ---
The native handles are not required by the standard, whether they exist or not
is implementation-defined. If they're not supportable we'll remove them, that's
not a problem.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #12 from Rich Felker ---
Jakub, this is not the place to discuss the pros and cons of musl or other
particular implementations; libstdc++ needs to support many which do not have
the glibc-specific semantics you want. In particular the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #11 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #4)
> Thanks, Martin. So maybe something like this:
>
> --- a/libstdc++-v3/include/std/mutex
> +++ b/libstdc++-v3/include/std/mutex
> @@ -726,7 +738,17 @@ _GLIBCX
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Rich Felker changed:
What|Removed |Added
CC||bugdal at aerifal dot cx
--- Comment #9 fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #8 from Jonathan Wakely ---
NetBSD 5 and DragonFly BSD fail the test too. I'm going to make libstdc++
assume pthread_once is not exception-aware unless specifically told otherwise
for targets where we know it works, such as x86-linux
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #7 from Martin Sebor ---
I opened http://sourceware.org/bugzilla/show_bug.cgi?id=18435 for the glibc bug
and attached a lightly tested patch to it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #6 from Andrey V ---
Same failure on s390x.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #5 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #4)
> Thanks, Martin. So maybe something like this:
This happens on almost all non-x86 machines. I tested it on aarch64 and we had
the same failure as powerpc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #3 from Martin Sebor ---
On Power, both glibc and AIX pthread_once behave the same way: i.e., they fail
to clear the once flag on exception. The test case below mimics glibc's
pthread_once and demonstrates the root cause of the probl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
--- Comment #2 from Andrey V ---
Replacing throw/try/catch with longjmp/setjmp for non-returning function exit,
like so:
#include
#include
#include
pthread_once_t flag_ = PTHREAD_ONCE_INIT;
int call_count = 0;
jmp_buf catch_;
void func_()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
--- Comment
65 matches
Mail list logo