[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2024-04-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #25 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #24) > > * testsuite/30_threads/jthread/95989.cc: New test. > > This testcase fails on FreeBSD 14: Related PRs there: PR 103444 and PR 82635; it might

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2024-04-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #24 from Jonathan Wakely --- > * testsuite/30_threads/jthread/95989.cc: New test. This testcase fails on FreeBSD 14: Starting program: /home/gcc/build/x86_64-unknown-freebsd14.0/libstdc++-v3/testsuite/95989.exe [New LWP

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2023-03-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #23 from CVS Commits --- The master branch has been updated by Alexandre Oliva : https://gcc.gnu.org/g:21edd841611a97442a6b95e8ec7e91ff8fd3a451 commit r13-6461-g21edd841611a97442a6b95e8ec7e91ff8fd3a451 Author: Alexandre Oliva Date:

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2022-03-08 Thread lightningdzeyenr at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #22 from Jackson Huff --- See bug 104852

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2022-03-04 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #21 from Jonathan Wakely --- (In reply to Jackson Huff from comment #20) > Have there been any updates regarding segfaults with pthread_join? I'm also > getting a segfault but with the C++20 jthread::detach() function instead. There

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2022-03-03 Thread lightningdzeyenr at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Jackson Huff changed: What|Removed |Added CC||lightningdzeyenr at gmail dot com --- Co

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2021-09-21 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Comment

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-11-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|---

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-11-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #17 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b11c74b0e357652a1f1f0d937455310a6389 commit r10-9055-gb11c74b0e357652a1f1f0d937455310a6389 Author: Jonathan Wake

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-11-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #16 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:08b4d325711d5c6f68ac29443aba3fd7aa173ac8 commit r11-5183-g08b4d325711d5c6f68ac29443aba3fd7aa173ac8 Author: Jonathan Wakely Date:

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-11-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #15 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #14) > > --- a/libgcc/gthr-posix.h > > +++ b/libgcc/gthr-posix.h > > @@ -684,7 +684,12 @@ __gthread_equal (__gthread_t __t1, __gthread_t __t2) > > static inline _

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #14 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #13) > I'm testing this: > > diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h > index 965247602ac..0af84a781e5 100644 > --- a/libgcc/gthr-posix.h > +++ b/li

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Jonathan Wakely changed: What|Removed |Added See Also||https://sourceware.org/bugz

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #12 from Jonathan Wakely --- (In reply to Antal Buss from comment #1) > Created attachment 48811 [details] > Preprocessed file For convenience, that is: #include int main() { auto t = std::jthread([](){}); t.request_stop();

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-06 Thread fw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #11 from Florian Weimer --- It turns out that libc.a did not contain pthread_self until glibc 2.27. The symbol was only present in libc.so.6 (as a weird forwarder, for compatibility with long-defunct LinuxThreads). This means there

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #10 from Jonathan Wakely --- I have a fix for std::this_thread::get_id() but we also need the same fix in and I'd rather refactor that first to only need to fix it in one place.

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-01 Thread fw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Florian Weimer changed: What|Removed |Added CC||fw at gcc dot gnu.org --- Comment #9 fr

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-07-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Jonathan Wakely changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-06-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #8 from Jonathan Wakely --- pthread_self seems to be defined in libc.a not libpthread.a so using --whole-archive around -lpthread doesn't help.

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-06-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #7 from Jonathan Wakely --- This happens with std::thread too, not just std::jthread. #include int main() { std::thread t; if (t.get_id() == std::this_thread::get_id()) throw 1; t.join(); } It looks like the weak pthread

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-06-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-06-30 Thread antal.buss at ualberta dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #6 from Antal Buss --- Unfortunately no, I'm compiling with (suggested in stackoverflow): g++-10 -Wall -Wextra -o test --static -std=c++20 test.cc -lrt -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive but still produci

[Bug libstdc++/95989] Segmentation fault compiling with static libraries and using jthread::request_stop

2020-06-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95989 --- Comment #5 from Jonathan Wakely --- Does -Wl,--whole-archive -lpthread make it work?