-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] new Microsoft Visual C++ 2015-2022 Redistributable requires #define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR #151
Comments
My two cents: @bshoshany if you add #define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR please made it optionnal. |
Well, we use BS_thread_pool.hpp in a software product and so we can’t
control which runtime a user might have installed nor other software that
might manipulate which runtimes are installed.
Also, seems that Windows 11 removes the older runtimes now as a default
behavior. But now that we understand the issue, sure, our software could
check the runtime version, I suppose. But we would prefer to address this
problem more directly.
*From:* Allan CORNET ***@***.***>
*Sent:* Sunday, June 9, 2024 5:47 PM
*To:* bshoshany/thread-pool ***@***.***>
*Cc:* MDMS24 ***@***.***>; Author ***@***.***>
*Subject:* Re: [bshoshany/thread-pool] [BUG] new Microsoft Visual C++
2015-2022 Redistributable requires #define
_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR (Issue #151)
My two cents:
If you have version 14.40.33810 installed on your PC, you won't encounter
any issues.
It's good practice to always verify that the runtime used to build the
application is available on the target PC. If it is not installed, the
installer should ensure its installation.
@bshoshany <https://github.com/bshoshany> if you add #define
_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR please made it optionnal.
—
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXMMXJIHM7F3L7JOAKXULTTZGR2FVAVCNFSM6AAAAABJA7MRU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWGY3DCNBUGE>
.
You are receiving this because you authored the thread.Message ID: <
***@***.***>
|
The point isn't to debate this here, but if you don't check the runtime, how can you be sure that your software works with your build on all platforms ? It's not the responsibility of the libraries to handle this issue, but rather your Visual Studio configuration.
You can also add this directive directly in your Visual Studio configuration. Discussion of M$ available here: |
Hi @MDMS24 and thanks for the bug report! Sorry for the late reply, I'm having a very busy week. On my PC I currently have Visual Studio 2022 v17.10.2 with Microsoft Visual C++ 2015-2022 Redistributable v14.40.33810. However, my test program ( Are you able to provide a minimal working example that demonstrates the crash you are encountering, so I can reproduce it on my end? |
Been using thread_pool.hpp version 2.0.0, building executables using MSVS 2022 with platform toolset v143.
With the following installed on Windows 11, both the old thread_pool.hpp version 2.0.0 and the new BS_thread_pool.hpp version 4.1.0 work as expected. (We updated to BS_thread_pool.hpp version 4.1.0 to get your support.)
But with the most recent MSVS 2022 update (from VS 2022 17.9 to VS 2022 17.10), the above redistributables are also updated as follows:
And with the above-listed 14.40.33810 redistributables, our software running thread_pool.hpp version 2.0.0 and the new BS_thread_pool.hpp version 4.1.0 crashes. Crash happens on all Windows 11 computers (various hardware, various software configurations) that we've tried.
The aforementioned crash happens on the line attempting to declare a pool of threads:
BS::thread_pool pool;
*** Executing the above line is causing the crash.
Digging into the "VS 2022 17.10" changelog on Github: https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710
As indicated above, my workaround to use BS_thread_pool.hpp with the newest MSVS 2022 update is to put:
#define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR
as the very first line in the file BS_thread_pool.hpp
Can you recommend and/or implement are more correct fix that allows mutex to be of type constexpr ?
Thanks in advance,
Manfred Sever.
The text was updated successfully, but these errors were encountered: