Opened 6 years ago
Closed 5 years ago
#12730 closed Patches (fixed)
windows - static threads library is incompatible with MSVC 2017 RC
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.66.0 | Component: | thread |
Version: | Boost 1.63.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
Microsoft Visual C++ 2017 RC
While being linked statically with threads library, the EXE exits with the code 255 right after the start.
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.
Seems that after the refactoring of CRT in VC2017 this inconsistency have become critical.
The fix proposed is in the attached version of tss_pe.cpp .
Attachments (1)
Change History (10)
by , 6 years ago
Attachment: | tss_pe.cpp added |
---|
comment:1 by , 6 years ago
Component: | threads → thread |
---|
comment:2 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Please, could you provide a patch or even better a github PR?
comment:3 by , 6 years ago
Sorry, I dont't use git, so don't do PRs.
The diff of changes proposed is here: http://pastebin.com/USCA1FN3
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.
Note that the fix was not tested on any other VS version.
comment:4 by , 6 years ago
FWIW, looking through some older MSVC CRT sources, back to MSVC 8 the CRT$XI
arrays were declared as having int
functions - albeit inconsistently, in some places they were treated as void
functions.
Anyway, perhaps consider extending the change to _MSC_VER >= 1400
.
comment:5 by , 5 years ago
Could someone having access to Windows and git apply the patch and provide a PR on git?
comment:6 by , 5 years ago
Summary: | static threads library is incompatible with MSVC 2017 RC → windows - static threads library is incompatible with MSVC 2017 RC |
---|
comment:8 by , 5 years ago
Milestone: | To Be Determined → Boost 1.66.0 |
---|
comment:9 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed tss_pe.cpp