Skip to content

[mini] Fix the bounds check in GET_BBLOCK #73493

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

Merged
merged 1 commit into from
Aug 6, 2022

Conversation

lambdageek
Copy link
Member

@lambdageek lambdageek commented Aug 5, 2022

If the target IP is out of bounds, but cfg->cil_offset_to_bb has some non-zero data before or after it, then tblock will be some non-NULL pointer that we will treat as a good basic block.

Related to #73474 (but doesn't fix the underlying issue there - it will just make the whole offending method throw a BadImageFormatException when it's called)

This may have some performance overhead for the mono JIT.

If the target IP is out of bounds, but `cfg->cil_offset_to_bb` has
some non-zero data before or after it, then `tblock` will be some
non-NULL pointer that we will treat as a good basic block.

Related to dotnet#73474 (but doesn't
fix the underlying issue there - it will just make the whole
offending method throw a BadImageFormatException when it's called)

This may have some performance overhead for the mono JIT.
@ghost ghost added the area-Codegen-JIT-mono label Aug 5, 2022
@ghost ghost assigned lambdageek Aug 5, 2022
@lambdageek lambdageek requested a review from BrzVlad August 5, 2022 19:44
@lambdageek
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lambdageek lambdageek merged commit 7c06020 into dotnet:main Aug 6, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants