Skip to content

Conversation

@bylaws
Copy link
Collaborator

@bylaws bylaws commented Jan 5, 2026

Prevent suspension when flushing thread state to the WOW64 context during BTCpuSetContext as suspension itself performs a flush. If suspension were to occur halfway through FlushThreadStateContext then the fact that the WOW64 context has been dirtied would be missed and the new context would be partially overwritten with stale data from the FEX thread state. Additionally if the context were to be dirtied by suspension at any point during context merging in BTCpuSetContext the input context could be lost.

Fixes occasional crashes when starting AC4.

Prevent suspension when flushing thread state to the WOW64 context
during BTCpuSetContext as suspension itself performs a flush. If
suspension were to occur halfway through FlushThreadStateContext then
the fact that the WOW64 context has been dirtied would be missed and the
new context would be partially overwritten with stale data from the FEX
thread state. Additionally if the context were to be dirtied by
suspension at any point during context merging in BTCpuSetContext the
input context could be lost.

Fixes occasional crashes when starting AC4.
@Sonicadvance1 Sonicadvance1 merged commit a25d90d into FEX-Emu:main Jan 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants