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

Jit: Assert on bad exit numbers, allow two more exits per block #18247

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Sep 26, 2023

Trying to fix an issue from #18116.

We should really do this exit tracking in a better way, but defer that to later.

I'm not even sure how more than 2 branches happen, but it really does look like they do in the logs. So bump it to 4. Trying to keep this change minimal.

@hrydgard hrydgard added this to the v1.16.5 milestone Sep 26, 2023
@hrydgard hrydgard merged commit 8baae83 into master Sep 26, 2023
18 checks passed
@hrydgard hrydgard deleted the jit-exit-fixes branch September 26, 2023 18:29
@@ -725,6 +725,9 @@ void Arm64Jit::UpdateRoundingMode(u32 fcr31) {
// though, as we need to have the SUBS flag set in the end. So with block linking in the mix,
// I don't think this gives us that much benefit.
void Arm64Jit::WriteExit(u32 destination, int exit_num) {
// TODO: Check destination is valid and trigger exception.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that sometimes code will have untaken invalid exits, such as jumps to zero and such. Usually they are breaks, though, but not always.

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ah, good point. Will sneak in a comment update later.

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