Re: [Boost-bugs] [Boost C++ Libraries] #13077: Linking to static 64bit libboost_thread fails DLL initialization

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13077: Linking to static 64bit libboost_thread fails DLL initialization
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-06-18 20:37:07


#13077: Linking to static 64bit libboost_thread fails DLL initialization
--------------------------------------------+-------------------------
  Reporter: Teemu Ikonen <teemu.ikonen@…> | Owner: anthonyw
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.63.0 | Severity: Showstopper
Resolution: | Keywords:
--------------------------------------------+-------------------------

Comment (by Teemu Ikonen <teemu.ikonen@…>):

 Traced the error to a call to `PVAPI on_tls_prepare()`. This function gets
 called by `_initterm_e` that expects it to return 0 on success.

 However in boost PVAPI is defined as void return type. I think this test
 is wrong for _MSC_VER 1910 in `tss_pe.cpp`.

 {{{
   #if (_MSC_VER < 1300) || (_MSC_VER > 1900) // 1300 == VC++ 7.0, 1900 ==
 VC++ 14.0
         typedef void (__cdecl *_PVFV)();
         #define INIRETSUCCESS
         #define PVAPI void __cdecl
     #else
         typedef int (__cdecl *_PVFV)();
         #define INIRETSUCCESS 0
         #define PVAPI int __cdecl
     #endif
 }}}

 The runtime initializer function is supposed to return an int
 {{{
 /C/Program Files (x86) $ find . -name "*.h" -print0|xargs -0 grep _PIFV |
 grep typedef
 find: ‘./Google/CrashReports’: Permission denied
 ./Microsoft Visual
 Studio/2017/Community/VC/Tools/MSVC/14.10.25017/crt/src/vcruntime/internal_shared.h:
 typedef int (__cdecl* _PIFV)(void);
 ./Microsoft Visual
 Studio/2017/Community/VC/Tools/MSVC/14.10.25017/crt/src/vcruntime/minternal.h:
 typedef int (__clrcall* _PIFVM)(void);
 ./Microsoft Visual
 Studio/2017/Community/VC/Tools/MSVC/14.10.25017/crt/src/vcruntime/vcruntime_internal.h:typedef
 int (__cdecl* _PIFV)(void);
 ./Microsoft Visual
 Studio/Shared/14.0/VC/crt/src/vcruntime/internal_shared.h: typedef int
 (__cdecl* _PIFV)(void);
 ./Microsoft Visual Studio/Shared/14.0/VC/crt/src/vcruntime/minternal.h:
 typedef int (__clrcall* _PIFVM)(void);
 ./Microsoft Visual
 Studio/Shared/14.0/VC/crt/src/vcruntime/vcruntime_internal.h:typedef int
 (__cdecl* _PIFV)(void);
 ./Windows Kits/10/Include/10.0.10240.0/ucrt/corecrt_startup.h:typedef int
 (__cdecl* _PIFV)(void);
 ./Windows Kits/10/Include/10.0.15063.0/ucrt/corecrt_startup.h:typedef int
 (__cdecl* _PIFV)(void);
 }}}

--
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13077#comment:2>
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-06-18 20:41:11 UTC