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

Fix case where mutex is never unlocked #67441

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

Zylann
Copy link
Contributor

@Zylann Zylann commented Oct 15, 2022

pattern_preview_mutex guards pattern_preview_queue, but due to how the code was written, it could remain locked even after the thread exits.

I found this while compiling Godot on Windows with /MTd, which enables standard library debug checks and uses the debug runtime library. However by default Godot always uses /MT, so errors like this easily fly under the radar. (more info here #31608)

@kleonc kleonc added this to the 4.0 milestone Oct 15, 2022
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

Looks good, the else block unlocking the mutex was indeed matching wrong if.

@akien-mga akien-mga merged commit a9114c6 into godotengine:master Oct 17, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants