This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/80258] On x86_64 with -fPIC, accesses to TLS can see the wrong thread's TLS
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 30 Mar 2017 08:22:47 +0000
- Subject: [Bug ipa/80258] On x86_64 with -fPIC, accesses to TLS can see the wrong thread's TLS
- Auto-submitted: auto-generated
- References: <bug-80258-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80258
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is not a bug, that is how TLS is designed. You shouldn't change threads
in the middle of a function. If you do, you shouldn't use TLS, but something
different; basically you are implementing your own threading library then and
you are responsible for arranging that it works.