Skip to content
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

Disable constexpr mutex constructors for MSVC #28225

Closed
wants to merge 2 commits into from

Conversation

p-wysocki
Copy link
Contributor

Details:

Tickets:

Signed-off-by: p-wysocki <[email protected]>
@p-wysocki p-wysocki added this to the 2025.0 milestone Dec 29, 2024
@p-wysocki p-wysocki requested a review from a team as a code owner December 29, 2024 12:33
@github-actions github-actions bot added the category: inference OpenVINO Runtime library - Inference label Dec 29, 2024
Signed-off-by: p-wysocki <[email protected]>
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have it globally enabled for the project

# Workaround for an MSVC compiler issue in some versions of Visual Studio 2022.
# The issue involves a null dereference to a mutex. For details, refer to link https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710
if(MSVC AND MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS 1941)
ov_add_compiler_flags(/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif()

is it not enough?

@ilya-lavrenov ilya-lavrenov self-assigned this Dec 30, 2024
@p-wysocki
Copy link
Contributor Author

I see it has been added on December 20th, while on my laptop I built master from December 19th. I didn't update branch due to long build time, I'll rebuild now and confirm the new flag also fixes CVS-159653.

@p-wysocki
Copy link
Contributor Author

Fixed in another PR. Waiting for confirmation from @olpipi before closing the ticket.

@p-wysocki p-wysocki closed this Jan 3, 2025
@olpipi
Copy link
Contributor

olpipi commented Jan 7, 2025

This fix works but it doesn't cover all msvc version with v143 toolset according to https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
I open a PR to fix it:
#28300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inference OpenVINO Runtime library - Inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants