-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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][interp] Fix an issue with deopt and interpreter tiering. #76743
Conversation
Tagging subscribers to this area: @BrzVlad Issue DetailsIf a method is tiered while being run from interp_run_clause_with_il_state (), the clause_args argument to interp_exec_method () still contains the old IL offsets confusing the EH code, i.e. this line:
Clear out clause_args at the beginning to avoid this.
|
@BrzVlad this might also affect the other cases where clause_args is set i.e. interp_run_finally ()/interp_run_filter (). |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
We should probably update the native offset in clause args |
f095cab
to
ae0fb37
Compare
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
If a method is tiered while being run from interp_run_clause_with_il_state (), the clause_args argument to interp_exec_method () still contains the old IL offsets confusing the EH code, i.e. this line: ``` if (clause_args && frame == clause_args->exec_frame && context->handler_ip >= clause_args->end_at_ip) ``` Clear out clause_args at the beginning to avoid this. Hopefully fixes dotnet#76134 dotnet#74302
The IL offsets in the clause_args argument become out-of-date after tiering up.
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3252554294 |
@vargaz From what I understand the problem with these issues was that the tiered ip was not updated in the |
The first commit fixed the original issue when called from with_il_state, the second one fixes the potential issue when called from run_finally ()/run_filter (). Maybe the second one fixes the first issue as well, but clearing out clause_args seems cleaner. |
I understand now that clearing out the clause_args might make sense when running catch clauses of aot methods, since we run with interp all the way until the method end, but doing this also for filter clauses seems bogus. |
clause_args is only really used when running finally/filter clauses for 'real' interpreted methods, we just reuse the argument from with_il_state () to avoid having to add another argument. So this is why we clear it. Maybe we should clear it for catch clauses as well. |
If a method is tiered while being run from interp_run_clause_with_il_state (), the clause_args argument to interp_exec_method () still contains the old IL offsets confusing the EH code, i.e. this line:
Clear out clause_args at the beginning to avoid this.
Hopefully fixes
#76134
#74302