Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 21742 invoked from network); 13 Nov 2008 17:51:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2008 17:51:35 -0000 Received: (qmail 57380 invoked by uid 500); 13 Nov 2008 17:51:42 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 57358 invoked by uid 500); 13 Nov 2008 17:51:42 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 57347 invoked by uid 99); 13 Nov 2008 17:51:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2008 09:51:42 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2008 17:50:30 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5559E234C283 for ; Thu, 13 Nov 2008 09:50:44 -0800 (PST) Message-ID: <2013805284.1226598644335.JavaMail.jira@brutus> Date: Thu, 13 Nov 2008 09:50:44 -0800 (PST) From: "Farid Zaripov (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Updated: (STDCXX-1023) [Windows] Don't use implicit TLS variables in stdcxx library In-Reply-To: <1554330860.1226598526142.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Farid Zaripov updated STDCXX-1023: ---------------------------------- Description: >From MSDN: {noformat} The Visual C++ compiler supports a syntax that enables you to declare thread-local variables: _declspec(thread). If you use this syntax in a DLL, you will not be able to load the DLL explicitly using LoadLibrary on versions of Windows prior to Windows Vista. If your DLL will be loaded explicitly, you must use the thread local storage functions instead of _declspec(thread). {noformat} Personally, I've got the Access Violation Exception during performing Boost.Python regression tests, since python.exe process loading the DLL using LoadLibrary() function. Since the user could make own DLL, linked against stdcxx statically or dynamically, and load this DLL using LoadLibrary() function, we should not use the implicit TLS in stdcxx library to avoid such problems. If we want use thread local variables in stdcxx, we should use TlsAlloc()/TlsFree()/TlsGetValue()/TlsSetValue() functions on Windows. was: >From MSDN: {noformat} The Visual C++ compiler supports a syntax that enables you to declare thread-local variables: _declspec(thread). If you use this syntax in a DLL, you will not be able to load the DLL explicitly using LoadLibrary on versions of Windows prior to Windows Vista. If your DLL will be loaded explicitly, you must use the thread local storage functions instead of _declspec(thread). {noformat} Personally, I've got the Access Violation Exception during performing Boost.Python regression tests, since python.exe process loading the DLL using LoadLibrary() function. Since the user could make own DLL, linked against stdcxx statically or dynamically, and load this DLL using LoadLibrary() function, we should not use the implicit TLS in stdcxx library to avoid such problems. If we want use thread local variables in stdcxx, we should use TlsAlloc()/TlsFree()/TlsGetValue()/TlsSetValue() functions on Windows. > [Windows] Don't use implicit TLS variables in stdcxx library > ------------------------------------------------------------ > > Key: STDCXX-1023 > URL: https://issues.apache.org/jira/browse/STDCXX-1023 > Project: C++ Standard Library > Issue Type: Bug > Components: Thread Safety > Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1 > Environment: Windows > Reporter: Farid Zaripov > Assignee: Farid Zaripov > Fix For: 4.2.2 > > > From MSDN: > {noformat} > The Visual C++ compiler supports a syntax that enables you to declare thread-local variables: > _declspec(thread). If you use this syntax in a DLL, you will not be able to load the DLL > explicitly using LoadLibrary on versions of Windows prior to Windows Vista. If your DLL will be > loaded explicitly, you must use the thread local storage functions instead of _declspec(thread). > {noformat} > Personally, I've got the Access Violation Exception during performing Boost.Python regression tests, since python.exe process loading the DLL using LoadLibrary() function. > Since the user could make own DLL, linked against stdcxx statically or dynamically, and load this DLL using LoadLibrary() function, we should not use the implicit TLS in stdcxx library to avoid such problems. If we want use thread local variables in stdcxx, we should use TlsAlloc()/TlsFree()/TlsGetValue()/TlsSetValue() functions on Windows. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.