-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Mono][AOT] Add missing unlock in mono_aot_get_class_from_name if aot table_size == 0
#122097
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
[Mono][AOT] Add missing unlock in mono_aot_get_class_from_name if aot table_size == 0
#122097
Conversation
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.
Pull request overview
This PR fixes a potential deadlock bug in the Mono AOT runtime by adding a missing unlock operation when table_size == 0 in the mono_aot_get_class_from_name function.
Key changes:
- Added braces around the early return when
table_size == 0 - Added
amodule_unlock(amodule)call before returning FALSE to match the locking pattern used in all other exit paths
|
@BrzVlad It looks like the failed llvmfullaot test is a known issue and not related to this PR, so I believe it should be safe to merge. |
|
Thank you for your contribution! |
|
/ba-g unrelated fullaotllvm failure |
|
Thank you all! I was also wondering if it would be possible to backport this change to .NET 10, as it would be very helpful for us to have this in place before the .NET 11 release. |
I'm not opposed to backporting. @BrzVlad what do you think? |
|
Yes I'll backport to .net9 and .net10 since it is a low risk change. The fix should be available in January for both releases. |
Fixes #122096