[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Bryan Drewery changed: What|Removed |Added Status|In Progress |Closed Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #18 from commit-h...@freebsd.org --- A commit references this bug: Author: bdrewery Date: Mon Aug 22 16:35:51 UTC 2016 New revision: 304611 URL: https://svnweb.freebsd.org/changeset/base/304611 Log: MFC r304608: Bump __FreeBSD_version for C++11 thread_local support in r303795. PR: 192320 Changes: _U stable/10/ stable/10/sys/sys/param.h -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #17 from commit-h...@freebsd.org --- A commit references this bug: Author: bdrewery Date: Mon Aug 22 16:04:25 UTC 2016 New revision: 304610 URL: https://svnweb.freebsd.org/changeset/base/304610 Log: MFS r304609: MFC r304608: Bump __FreeBSD_version for C++11 thread_local support in r303795. PR: 192320 Approved by: re (gjb) Changes: _U releng/11.0/ releng/11.0/sys/sys/param.h -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #16 from commit-h...@freebsd.org --- A commit references this bug: Author: bdrewery Date: Mon Aug 22 15:53:33 UTC 2016 New revision: 304609 URL: https://svnweb.freebsd.org/changeset/base/304609 Log: MFC r304608: Bump __FreeBSD_version for C++11 thread_local support in r303795. PR: 192320 Changes: _U stable/11/ stable/11/sys/sys/param.h -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #15 from commit-h...@freebsd.org --- A commit references this bug: Author: bdrewery Date: Mon Aug 22 15:52:04 UTC 2016 New revision: 304608 URL: https://svnweb.freebsd.org/changeset/base/304608 Log: Bump __FreeBSD_version for C++11 thread_local support in r303795. PR: 192320 Changes: head/sys/sys/param.h -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #14 from Mikhail Teterin --- Some of the ports could benefit from knowing, the functionality is available. Can the OSVERSION be bumped to reflect it? Thanks! -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Bryan Drewery changed: What|Removed |Added CC||bdrew...@freebsd.org --- Comment #13 from Bryan Drewery --- r303795 | kib | 2016-08-06 06:32:40 -0700 (Sat, 06 Aug 2016) | 37 lines Changed paths: M /head/lib/libc/include/libc_private.h M /head/lib/libc/stdlib/Makefile.inc M /head/lib/libc/stdlib/Symbol.map A /head/lib/libc/stdlib/cxa_thread_atexit.c M /head/lib/libc/stdlib/exit.c M /head/lib/libc/tests/stdlib/Makefile M /head/lib/libc/tests/stdlib/Makefile.depend A /head/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc A /head/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc M /head/lib/libthr/thread/thr_exit.c Add __cxa_thread_atexit(3) API implementation. This is the backing feature to implement C++11 thread storage duration specified by the thread_local keyword. A destructor for given thread-local object is registered to be executed at the thread termination time using __cxa_thread_atexit(). Libc calls the __cxa_thread_calls_dtors() during exit(3), before finalizers and atexit functions, and libthr calls the function at the thread termination time, after the stack unwinding and thread-specific key destruction. There are several uncertainties in the API which lacks a formal specification. Among them: - is it allowed to register destructors during destructing; we allow, but limiting the nesting level. If too many iterations detected, a diagnostic is issued to stderr and thread forcibly terminates for now. - how to handle destructors which belong to an unloading dso; for now, we ignore destructor calls for such entries, and issue a diagnostic. Linux does prevent dso unload until all threads with destructors from the dso terminated. It is supposed that the diagnostics allow to detect real-world applications relying on the above details and possibly adjust our implementation. Right now the choices were to provide the slim API (but that rarely stands the practice test). Tests are added to check generic functionality and to specify some of the above implementation choices. Submitted by: Mahdi Mokhtari Reviewed by:theraven Discussed with: dim (detection of -std=c++11 supoort for tests) Sponsored by: The FreeBSD Foundation (my involvement) MFC after: 2 weeks Differential revisions: https://reviews.freebsd.org/D7224, https://reviews.freebsd.org/D7427 -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Kubilay Kocak changed: What|Removed |Added Flags||mfc-stable9?, ||mfc-stable10?, ||mfc-stable11? Status|New |In Progress CC||freebsd-toolchain@FreeBSD.o ||rg Assignee|freebsd-toolchain@FreeBSD.o |k...@freebsd.org |rg | --- Comment #12 from Kubilay Kocak --- Assign to committer that resolved. @Kib, can you add a reference to the change please, and does this need or has it been MFC'd? Set mfc-stable* flags to + where/when merged, or to - with comment if not required -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #10 from Hannes Hauswedell --- This issue is now two years old and I have to work around it more and more often. If a "good solution" is so difficult to make, can we at least have some workaround? Thank you very much! -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #11 from David Chisnall --- Kib committed the a fix for this to head recently. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Mikhail Teterin changed: What|Removed |Added CC||m...@freebsd.org --- Comment #9 from Mikhail Teterin --- Please, be sure to bump OSVERSION, when this is committed -- so that the various work-arounds implemented in the ports in the mean time can be made conditional... Thanks! -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Hannes Hauswedell changed: What|Removed |Added CC||h2+fbsdpo...@fsfe.org --- Comment #8 from Hannes Hauswedell --- Indeed, a fix would be great! Thank you. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Duraid Madina changed: What|Removed |Added CC||dur...@octopus.com.au --- Comment #7 from Duraid Madina --- (In reply to David Chisnall from comment #4) > A complete solution most likely involves locking the library in memory while > it has outstanding thread-local objects. This sounds like a perfectly decent solution - is it something you are able to implement? This bug is going to bite more frequently as more C++11 is written. :( -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Rudolf-Walter Kiss-Szakacs changed: What|Removed |Added CC||rudolf...@gmail.com --- Comment #6 from Rudolf-Walter Kiss-Szakacs --- I have also encountered this while trying to port something to FreeBSD. Is there no news? -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #5 from Tijl Coosemans --- (In reply to David Chisnall from comment #4) That's what glibc seems to do. When a thread calls dlclose its thread_local variables are destroyed, but if there are other threads with thread_local variables the DSO is kept in memory until those variables are destroyed (when the threads exit or call dlclose). https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #4 from David Chisnall --- I'm still not completely sure what the correct solution for implementing this is. Clang will always lazily construct thread_local objects on first access (which means that you can't use them to track thread counts and so on, which limits their use somewhat), but the destructors will run when the thread exits. Unfortunately, the destructors might not be signal safe and so there is no *good* way of running them on library unload. A complete solution most likely involves locking the library in memory while it has outstanding thread-local objects. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #3 from Steve Wills --- (In reply to David Chisnall from comment #2) Any status update on this? I've run into this issue too. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 --- Comment #2 from David Chisnall --- I did write a __cxa_thread_atexit a while ago, but I haven't yet committed it (I'll try to find it). I didn't commit it because the semantics of _Thread_local are very poorly defined in the presence of shared libraries. I could think of three wrong ways of implementing it (one of which was chosen by libsupc++), but no right way. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Dimitry Andric changed: What|Removed |Added CC||d...@freebsd.org, ||thera...@freebsd.org --- Comment #1 from Dimitry Andric --- Our __cxa_atexit() is in lib/libc/stdlib/atexit.c, but apparently we don't have a corresponding __cxa_thread_atexit() yet. I'm not entirely sure where it should live, though: GNU puts it in libsupc++, so for use that would correspond to libcxxrt... -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 192320] Use of thread_local produces linking errors on system version of clang++
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Tijl Coosemans changed: What|Removed |Added CC||t...@freebsd.org Assignee|freebsd-b...@freebsd.org|freebsd-toolchain@FreeBSD.o ||rg -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"