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

AudioUnitManager: Avoid undefined behavior by initializing m_isInstantiated to false #13938

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Nov 26, 2024

Turns out creating a std::atomic<bool> without initializing it is very likely undefined behavior, so we ought to initialize it.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you.

The behavior has changed since C++20 which we use in the 2.5 branch.

set(CMAKE_CXX_STANDARD 20)

But it can't hurt to explicit initialize a bool here.

@daschuer daschuer merged commit 452263d into mixxxdj:2.5 Nov 26, 2024
13 checks passed
@fwcd fwcd deleted the initialize-is-instantiated branch November 26, 2024 20:20
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.

2 participants