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

PatchEngine: Attempt to fix crash in IsStackSane #8886

Merged
merged 1 commit into from Aug 8, 2020

Conversation

JosJuice
Copy link
Member

HostIsInstructionRAMAddress uses XCheckTLBFlag::OpcodeNoException, so we should also use XCheckTLBFlag::OpcodeNoException when reading, to ensure that we use the IBAT (as opposed to the DBAT) for both.

I made this change in an attempt to fix a crash a user was experiencing at PatchEngine.cpp:234, but it seems like this change didn't actually fix that crash. I'm submitting it anyway because the mismatched behavior we have right now seems a little odd.

HostIsInstructionRAMAddress uses XCheckTLBFlag::OpcodeNoException,
so we should also use XCheckTLBFlag::OpcodeNoException when reading,
to ensure that we use the IBAT (as opposed to the DBAT) for both.
@AdmiralCurtiss
Copy link
Contributor

Makes sense to me, though I'm kinda surprised this hasn't been a problem before. I guess the two BATs are rarely different? And HostRead_Instruction() is not used in a lot of places either.

@Tilka Tilka merged commit 3101d95 into dolphin-emu:master Aug 8, 2020
@JosJuice JosJuice deleted the stack-check-instruction branch August 8, 2020 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants