-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Move a lock to protect m_pDynamicStaticsInfo #95769
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
Conversation
|
I also removed |
jkotas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7618727880 |
When multiple threads enter
Module::AllocateDynamicEntry(MethodTable *pMT), the address ofm_pDynamicStaticsInfomight be changed and one of the threads could registerpMTin the old array.Here is a sample crash.
pLocalModulein frame 8You can see that 30th item is {pEnclosingMT = 0x0}.
I think this happens the address of
m_pDynamicStaticsInfois not protected during array memcpy() and switching.