Re: [Boost-bugs] [Boost C++ Libraries] #2226: boost::thread 1.36.0 /clr Link Error LNK2022

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2226: boost::thread 1.36.0 /clr Link Error LNK2022
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-27 23:46:33


#2226: boost::thread 1.36.0 /clr Link Error LNK2022
-----------------------------------+--------------------------------------
  Reporter: benjamin.sternlieb@… | Owner: anthonyw
      Type: Bugs | Status: closed
 Milestone: Boost 1.36.0 | Component: thread
   Version: Boost 1.37.0 | Severity: Showstopper
Resolution: wontfix | Keywords: clr dummy thread LNK2022
-----------------------------------+--------------------------------------

Comment (by Tukra <list@…>):

 This line in tss_pe.cpp:

 __declspec(allocate(".CRT$XLC")) _TLSCB __xl_ca=on_tls_callback;

 causes a crash when statically linking boost.thread into a mixed-mode dll.
 From what I can tell this callback is only used for thread cleanup in exe
 builds. DLL builds will still get the same behavior via a dllmain hook:

 extern BOOL (WINAPI * const _pRawDllMain)(HANDLE, DWORD,
 LPVOID)=&dll_callback;

 So it seems safe to comment out the XLC hook if you are linking
 boost.thread into a dll.

 Also this is no longer a problem on Windows 10.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2226#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-04-27 23:51:27 UTC