Boost C++ Libraries: Ticket #12730: windows - static threads library is incompatible with MSVC 2017 RC
https://svn.boost.org/trac10/ticket/12730
<p>
Microsoft Visual C++ 2017 RC
</p>
<p>
While being linked statically with threads library, the EXE exits with the code 255 right after the start.
</p>
<p>
The problem is because of _PVFV/_PIFV function type mixup in /boost/libs/thread/src/win32/tss_pe.cpp - the on_tls_prepare() is expected to return zero, but it does not initialize the return value.
</p>
<p>
Seems that after the refactoring of CRT in VC2017 this inconsistency have become critical.
</p>
<p>
The fix proposed is in the attached version of tss_pe.cpp .
</p>
en-usBoost C++ Libraries/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/12730
Trac 1.4.3z7z7z@…Thu, 05 Jan 2017 20:56:05 GMTattachment set
https://svn.boost.org/trac10/ticket/12730
https://svn.boost.org/trac10/ticket/12730
<ul>
<li><strong>attachment</strong>
→ <span class="trac-field-new">tss_pe.cpp</span>
</li>
</ul>
<p>
Fixed tss_pe.cpp
</p>
TicketviboesSun, 19 Feb 2017 11:08:10 GMTcomponent changed
https://svn.boost.org/trac10/ticket/12730#comment:1
https://svn.boost.org/trac10/ticket/12730#comment:1
<ul>
<li><strong>component</strong>
<span class="trac-field-old">threads</span> → <span class="trac-field-new">thread</span>
</li>
</ul>
TicketviboesSun, 19 Feb 2017 11:09:08 GMTowner, status changed
https://svn.boost.org/trac10/ticket/12730#comment:2
https://svn.boost.org/trac10/ticket/12730#comment:2
<ul>
<li><strong>owner</strong>
changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span>
</li>
<li><strong>status</strong>
<span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span>
</li>
</ul>
<p>
Please, could you provide a patch or even better a github PR?
</p>
TicketanonymousSun, 19 Feb 2017 18:30:28 GMT
<link>https://svn.boost.org/trac10/ticket/12730#comment:3 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12730#comment:3</guid>
<description>
<p>
Sorry, I dont't use git, so don't do PRs.
</p>
<p>
The diff of changes proposed is here:
<a class="ext-link" href="http://pastebin.com/USCA1FN3"><span class="icon"></span>http://pastebin.com/USCA1FN3</a>
</p>
<p>
The idea is that seems we can't actually generalize that all callbacks are non-returning or that all callbacks are int-returning.
We have to differentiate between _I and _V versions.
</p>
<p>
Note that the fix was not tested on any other VS version.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<author>frank.richter@…</author>
<pubDate>Tue, 21 Feb 2017 09:17:30 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/12730#comment:4 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12730#comment:4</guid>
<description>
<p>
FWIW, looking through some older MSVC CRT sources, back to MSVC 8 the <code>CRT$XI</code> arrays were declared as having <code>int</code> functions - albeit inconsistently, in some places they were treated as <code>void</code> functions.
Anyway, perhaps consider extending the change to <code>_MSC_VER >= 1400</code>.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>viboes</dc:creator>
<pubDate>Tue, 22 Aug 2017 21:53:40 GMT</pubDate>
<title/>
<link>https://svn.boost.org/trac10/ticket/12730#comment:5 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12730#comment:5</guid>
<description>
<p>
Could someone having access to Windows and git apply the patch and provide a PR on git?
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>viboes</dc:creator>
<pubDate>Thu, 24 Aug 2017 06:00:23 GMT</pubDate>
<title>summary changed
https://svn.boost.org/trac10/ticket/12730#comment:6
https://svn.boost.org/trac10/ticket/12730#comment:6
<ul>
<li><strong>summary</strong>
<span class="trac-field-old">static threads library is incompatible with MSVC 2017 RC</span> → <span class="trac-field-new">windows - static threads library is incompatible with MSVC 2017 RC</span>
</li>
</ul>
TicketAndrey SemashevSun, 27 Aug 2017 16:24:43 GMT
<link>https://svn.boost.org/trac10/ticket/12730#comment:7 </link>
<guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12730#comment:7</guid>
<description>
<p>
See <a class="ext-link" href="https://github.com/boostorg/thread/pull/131"><span class="icon"></span>https://github.com/boostorg/thread/pull/131</a>.
</p>
</description>
<category>Ticket</category>
</item>
<item>
<dc:creator>viboes</dc:creator>
<pubDate>Sun, 27 Aug 2017 18:59:28 GMT</pubDate>
<title>milestone changed
https://svn.boost.org/trac10/ticket/12730#comment:8
https://svn.boost.org/trac10/ticket/12730#comment:8
<ul>
<li><strong>milestone</strong>
<span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.66.0</span>
</li>
</ul>
<p>
<a class="ext-link" href="https://github.com/boostorg/thread/commit/584b9c2d2963c7ed2f40d0964b24a6807ce0fe74"><span class="icon"></span>https://github.com/boostorg/thread/commit/584b9c2d2963c7ed2f40d0964b24a6807ce0fe74</a>
</p>
TicketviboesSat, 16 Sep 2017 16:33:09 GMTstatus changed; resolution set
https://svn.boost.org/trac10/ticket/12730#comment:9
https://svn.boost.org/trac10/ticket/12730#comment:9
<ul>
<li><strong>status</strong>
<span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span>
</li>
<li><strong>resolution</strong>
→ <span class="trac-field-new">fixed</span>
</li>
</ul>
<p>
<a class="ext-link" href="https://github.com/boostorg/thread/commit/739f8eeb81d74f1a559d8a075985a3f6e8d7b48b"><span class="icon"></span>https://github.com/boostorg/thread/commit/739f8eeb81d74f1a559d8a075985a3f6e8d7b48b</a>
</p>
Ticket