-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[mono][interp] Fix attempt to free tiering data when tiering is disabled #119294
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
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 regression where the interpreter attempts to free tiering-related data even when tiering is disabled. The issue was introduced in a previous PR (#119176) and wasn't caught because tiering is enabled by default in testing environments.
Key Changes
- Adds an early return guard to prevent processing when tiering is disabled
- Prevents potential crashes or undefined behavior when tiering functionality is turned off
|
Tagging subscribers to this area: @BrzVlad, @kotlarmilos |
|
/ba-g wasm unrelated failures |
…otnet#119176) * [mono][interp] Fix leaking of compilation data For dynamic methods, imethod_alloc0 allocates from the dynamic method's mempool which is freed when the method is collected. We were previously allocating only from the global memory manager. * [mono][interp] Stop leaking data items Previously we were registering imethod locations from these data items in order for them to be patched once a method is tiered up. Because of this registering, the data item had to always be around. We now free the data item for dynamic methods and also we deregister the patch locations when freeing such a method. * [mono][interp] Free headers allocated for inlined methods We add them to a list for later freeing. This uses the same pattern as jit. * [mono][interp] Skip interp free for methods not yet compiled Fix attempt to free tiering data when tiering is disabled (dotnet#119294)
…otnet#119176) * [mono][interp] Fix leaking of compilation data For dynamic methods, imethod_alloc0 allocates from the dynamic method's mempool which is freed when the method is collected. We were previously allocating only from the global memory manager. * [mono][interp] Stop leaking data items Previously we were registering imethod locations from these data items in order for them to be patched once a method is tiered up. Because of this registering, the data item had to always be around. We now free the data item for dynamic methods and also we deregister the patch locations when freeing such a method. * [mono][interp] Free headers allocated for inlined methods We add them to a list for later freeing. This uses the same pattern as jit. * [mono][interp] Skip interp free for methods not yet compiled Fix attempt to free tiering data when tiering is disabled (dotnet#119294)
This regressed after #119176. Tiering is enabled by default so this bug slipped through.