From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id BD90138438A4; Sun, 13 Dec 2020 17:43:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD90138438A4 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/iains/heads/d-for-darwin)] D, Darwin : Do not allow moving fibres between pthreads. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/iains/heads/d-for-darwin X-Git-Oldrev: 874c22a8289142029f75854d3dd089f08268ae3d X-Git-Newrev: f590fa6dc8f96c4d54eb0d7953e602744a141946 Message-Id: <20201213174348.BD90138438A4@sourceware.org> Date: Sun, 13 Dec 2020 17:43:48 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2020 17:43:48 -0000 https://gcc.gnu.org/g:f590fa6dc8f96c4d54eb0d7953e602744a141946 commit f590fa6dc8f96c4d54eb0d7953e602744a141946 Author: Iain Sandoe 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) {