public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Iain D Sandoe <iains@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/iains/heads/d-for-darwin)] D, Darwin : Do not allow moving fibres between pthreads.
Date: Mon, 21 Dec 2020 20:37:08 +0000 (GMT)	[thread overview]
Message-ID: <20201221203708.076F43870884@sourceware.org> (raw)

https://gcc.gnu.org/g:73a03aaca5be37a6de554603dc7a046b6614fda2

commit 73a03aaca5be37a6de554603dc7a046b6614fda2
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Thu Dec 10 14:06:07 2020 +0000

    D, Darwin : Do not allow moving fibres between pthreads.
    
    Emulated TLS targets (and, indeed some native TLS ones too)
    on GCC should not allow fibres to be moved between threads
    since the ME keeps pointers to TLS vars cached as an internal
    detail and cannot see that a function call could return on a
    different thread.

Diff:
---
 libphobos/libdruntime/core/thread.d | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libphobos/libdruntime/core/thread.d b/libphobos/libdruntime/core/thread.d
index 5381cda103b..843125831aa 100644
--- a/libphobos/libdruntime/core/thread.d
+++ b/libphobos/libdruntime/core/thread.d
@@ -5311,6 +5311,11 @@ unittest
 // Multiple threads running shared fibers
 version (PPC)   version = UnsafeFiberMigration;
 version (PPC64) version = UnsafeFiberMigration;
+version (Darwin)
+{
+  version (X86)   version = UnsafeFiberMigration;
+  version (X86_64) version = UnsafeFiberMigration;
+}
 
 version (UnsafeFiberMigration)
 {


             reply	other threads:[~2020-12-21 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 20:37 Iain D Sandoe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-11 21:26 Iain D Sandoe
2020-12-13 17:43 Iain D Sandoe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201221203708.076F43870884@sourceware.org \
    --to=iains@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).