Uh oh!
There was an error while loading. Please reload this page.
[mono][interp] Fix an issue with deopt and interpreter tiering. - #76743
Conversation
ghost
commented
Oct 7, 2022
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.
|
vargaz
commented
Oct 7, 2022
@BrzVlad this might also affect the other cases where clause_args is set i.e. interp_run_finally ()/interp_run_filter (). |
vargaz
commented
Oct 7, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
BrzVlad
commented
Oct 7, 2022
We should probably update the native offset in clause args |
f095cab to
ae0fb37Comparevargaz
commented
Oct 9, 2022
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Oct 9, 2022
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Oct 10, 2022
/azp run runtime |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Oct 10, 2022
/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 fixesdotnet#76134dotnet#74302
The IL offsets in the clause_args argument become out-of-date after tiering up.
lewing
commented
Oct 14, 2022
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3252554294 |
BrzVlad
commented
Oct 14, 2022
@vargaz From what I understand the problem with these issues was that the tiered ip was not updated in the |
vargaz
commented
Oct 14, 2022
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. |
BrzVlad
commented
Oct 17, 2022
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. |
vargaz
commented
Oct 17, 2022
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