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

Core: Fix PauseAndLock segfaulting under certain circumstances #9623

Merged
merged 1 commit into from Apr 6, 2021

Conversation

Techjar
Copy link
Contributor

@Techjar Techjar commented Apr 3, 2021

This can happen if it's called before the core has fully initialized, as is happening in https://bugs.dolphin-emu.org/issues/12473.

There might be other side effects from this, so it should probably be tested more thoroughly. Maybe need a mutex?

This can happen if it's called before the core has fully initialized.
@CookiePLMonster
Copy link
Contributor

Partially overlaps with #8335, your solution is more localized though.

@Techjar
Copy link
Contributor Author

Techjar commented Apr 4, 2021

Ah, so we both stumbled across the same bug. Didn't realize there was already a PR. However, I did actually find a way to reproduce it without changing code to create a contrived scenario.

In both PRs though, I see the potential for a very tight race condition where RunAsCPUThread can execute non-thread-safe code while the core is still booting, which might be a problem under far more specific circumstances.

@leoetlino
Copy link
Member

#8335 is a more complete solution and addresses other problems but I guess it doesn't hurt to fix this more common case first.

@leoetlino leoetlino merged commit ac250f7 into dolphin-emu:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants