[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.
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