Skip to content

Conversation

@BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented May 27, 2022

When unwinding the stack during EH, we first populate a StackFrameInfo with various data, like native_offset and jinfo. Let's assume this data is for an untiered method. If this frame has multiple finally clauses that need to be invoked, a finally invocation could tier up the InterpFrame that it is executing. The future finally invocations would use the IPs from the previously resolved untiered method. This change makes the interpreter receive only the clause index (in interp_run_finally) so we correctly resolve the native offsets of the handler.

Fixes #69868, maybe also #69864

When unwinding the stack during EH, we first populate a StackFrameInfo with various data, like native_offset and jinfo. Let's assume this data is for an untiered method. If this frame has multiple finally clauses that need to be invoked, a finally invocation could tier up the InterpFrame that it is executing. The future finally invocations would use the IPs from the previously resolved untiered method. This change makes the interpreter receive only the clause index (in interp_run_finally) so we correctly resolve the native offsets of the handler.
@ghost
Copy link

ghost commented May 27, 2022

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

When unwinding the stack during EH, we first populate a StackFrameInfo with various data, like native_offset and jinfo. Let's assume this data is for an untiered method. If this frame has multiple finally clauses that need to be invoked, a finally invocation could tier up the InterpFrame that it is executing. The future finally invocations would use the IPs from the previously resolved untiered method. This change makes the interpreter receive only the clause index (in interp_run_finally) so we correctly resolve the native offsets of the handler.

Fixes #69868, maybe also #69864

Author: BrzVlad
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@BrzVlad
Copy link
Member Author

BrzVlad commented May 27, 2022

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrzVlad
Copy link
Member Author

BrzVlad commented May 30, 2022

Could I get a review on this, since it fixes CI failures.

@BrzVlad BrzVlad merged commit 842b6a8 into dotnet:main May 30, 2022
@radical
Copy link
Member

radical commented May 31, 2022

@BrzVlad can I close #69864 and #69934 now? And does only this PR need to be back ported to preview5 as the fix?

@BrzVlad
Copy link
Member Author

BrzVlad commented May 31, 2022

There is no need to backport this as we shouldn't have tiering enabled on preview5.

I closed the issues, but keep eyes open for any suspect interp crashes and point them over to me.

@ghost ghost locked as resolved and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[release/7.0-preview5] Assertion failure in interpreter on v8/windows: src/mono/mono/mini/interp/interp.c:3440

3 participants