Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Mar 8, 2020

Fixes #32828

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't add an area label to this PR.

Checkout this page to find out which area owner to ping, or please add exactly one area label to help train me in the future.

}
CONTRACT_END;

Dictionary* pDictionary = pMD->GetMethodDictionary();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is where the race condition was. We have fetched the Dictionary, then some other thread expanded the dictionary, and then we fetched the number of slot from the new Dictionary; but still kept using the old Dictionary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks Jan for tracking this down!

@jkotas
Copy link
Member Author

jkotas commented Mar 8, 2020

@fadimounir I have done detailed review of the code, and I believe that I have found the race condition. See the comment above. I have also tightened up the implementation in a few places as I was doing it.

@jkotas jkotas merged commit fc2e56c into dotnet:master Mar 9, 2020
@jkotas jkotas deleted the gendict-fix branch March 9, 2020 21:40
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
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.

Assert failure HasPerInstInfo() methodtable.h Line: 2908

3 participants