Skip to content

[mini] Fix the bounds check in GET_BBLOCK - #73493

Merged
lambdageek merged 1 commit into
dotnet:mainfrom
lambdageek:fix-get_bblock-bounds-check
Aug 6, 2022
Merged

[mini] Fix the bounds check in GET_BBLOCK#73493
lambdageek merged 1 commit into
dotnet:mainfrom
lambdageek:fix-get_bblock-bounds-check

Conversation

@lambdageek

@lambdageeklambdageek commented Aug 5, 2022

Copy link
Copy Markdown
Member

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.
@lambdageek

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lambdageek
lambdageek merged commit 7c06020 into dotnet:mainAug 6, 2022
@ghostghost locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for freeto 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

@lambdageek@BrzVlad