JIT: Null out exceptions in reused continuations and reenable continuation reuse#125869
Open
jakobbotsch wants to merge 3 commits intodotnet:mainfrom
Open
JIT: Null out exceptions in reused continuations and reenable continuation reuse#125869jakobbotsch wants to merge 3 commits intodotnet:mainfrom
jakobbotsch wants to merge 3 commits intodotnet:mainfrom
Conversation
On resumption we use the presence of an exception object as the indicator for whether an exception should be rethrown. With continuation reuse we should take care to reset this exception so that we do not rethrow the same exception on a future resumption.
Member
Author
|
/azp run runtime-coreclr libraries-jitstress |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates async continuation reuse behavior to avoid rethrowing stale exceptions when a continuation instance is reused, and adds a regression test for the scenario.
Changes:
- Add regression test covering exception reuse across multiple awaits.
- Clear the stored exception field in the continuation when reuse is enabled.
- Introduce a method-hash-range gate for continuation reuse (debug-only), and change the default for reuse.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/tests/async/regression/125805.csproj | Adds a new IL test project for the regression case. |
| src/tests/async/regression/125805.cs | Adds a regression test exercising exception then non-exception resumption. |
| src/coreclr/jit/jitconfigvalues.h | Adds a range config for reuse and changes the default reuse setting. |
| src/coreclr/jit/async.cpp | Clears exception field on resumption when reuse is enabled; adds debug range gating. |
3 tasks
Member
Author
|
All libraries tests passed except for one failure that looks like #125295 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On resumption we use the presence of an exception object as the indicator for whether an exception should be rethrown. With continuation reuse we should take care to reset this exception so that we do not rethrow the same exception on a future resumption.
Fix #125805
Fix #125806