Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 2015 21:30:35 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-toolchain@FreeBSD.org
Subject:   [Bug 192320] Use of thread_local produces linking errors on system version of clang++
Message-ID:  <bug-192320-29464-UvPyGpWFJ0@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-192320-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-192320-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320

--- Comment #4 from David Chisnall <theraven@FreeBSD.org> ---
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-192320-29464-UvPyGpWFJ0>