This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Fix deadlock in ReadyToRun scenarios between EH and code heap deletion #14529
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the caller to
ReadyToRunJitManager::JitCodeToMethodInfo
doesn't care about theMethodDesc
orEECodeInfo
for the code (and passes in NULL for both), we shouldn't be doing any lookups to determine the method desc.Turns out this pattern is used every time we call
IsManagedCode
in the ReadyToRun case (since we just want to know whether the code is managed or not) so this will avoid some extra work.Also, this fixes the bug reported in #9745 where the pointless lookup causes the following deadlock (copied from my comment in that thread):
Also, I couldn't help but fix some weird casing for locals in this function while I was touching it 😄
@jkotas PTAL