Skip to content
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

[interp] Retain trace during exception checkpoint #56825

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Aug 4, 2021

When an exception needs to cross a native boundary, it can be caught by the runtime invoke wrapper and this exception will end up as a pending exception. With JIT, the initial managed to native wrapper will check for a pending exception and will use a CEE_MONO_RETHROW opcode in order to preserve the stacktrace. With the interp we do the exception checkpoint outside of the native wrapper, and we need to do it in rethrow fashion (without clearing the original trace).

Fixes #53599

When an exception needs to cross a native boundary, it can be caught by the runtime invoke wrapper and this exception will end up as a pending exception. With JIT, the initial managed to native wrapper will check for a pending exception and will use a CEE_MONO_RETHROW opcode in order to preserve the stacktrace. With the interp we do the exception checkpoint outside of the native wrapper, and we need to do it in rethrow fashion (without clearing the original trace).
@ghost
Copy link

ghost commented Aug 4, 2021

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

Issue Details

When an exception needs to cross a native boundary, it can be caught by the runtime invoke wrapper and this exception will end up as a pending exception. With JIT, the initial managed to native wrapper will check for a pending exception and will use a CEE_MONO_RETHROW opcode in order to preserve the stacktrace. With the interp we do the exception checkpoint outside of the native wrapper, and we need to do it in rethrow fashion (without clearing the original trace).

Fixes #53599

Author: BrzVlad
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@lewing lewing merged commit e74f181 into dotnet:main Aug 4, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 3, 2021
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.

Disabled test: System.Linq.Expressions.Tests.InterpreterTests.ConstructorThrows_StackTrace
3 participants