You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2008/11/13 18:48:46 UTC

[jira] Created: (STDCXX-1023) [Windows] Don't use implicit TLS variables in stdcxx library

[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.2.1, 4.2.0, 4.1.4, 4.1.3, 4.1.2
         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.


[jira] Updated: (STDCXX-1023) [Windows] Don't use implicit TLS variables in stdcxx library

Posted by "Farid Zaripov (JIRA)" <ji...@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.


[jira] Resolved: (STDCXX-1023) [Windows] Don't use implicit TLS variables in stdcxx library

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov resolved STDCXX-1023.
-----------------------------------

    Resolution: Fixed

Fixed thus: http://svn.apache.org/viewvc?rev=713762&view=rev

> [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.


[jira] Closed: (STDCXX-1023) [Windows] Don't use implicit TLS variables in stdcxx library

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov closed STDCXX-1023.
---------------------------------


Merged in 4.3.x branch and trunk thus:
http://svn.apache.org/viewvc?rev=713771&view=rev
http://svn.apache.org/viewvc?rev=713770&view=rev

> [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.