Skip to content

[release/10.0] [CoreCLR] Protect exception object across funclet callbacks - #136708

Open
github-actions[bot] wants to merge 1 commit into
release/10.0from
backport/pr-132482-to-release/10.0
Open

github-actions[bot] wants to merge 1 commit into
release/10.0from
backport/pr-132482-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #132482 to release/10.0

/cc @janvorli @steveisok

Customer Impact

  • Customer reported
  • Found internally

Application can crash due to a GC hole e.g. with access violation when profiler or debugger is attached to it. The exception object is not correctly protected in the CallCatchFunclet and CallFilterFunclet across a call to notify debugger or profiler on the exception.

Regression

Testing

Targeted regression test, coreclr tests

Risk

Low, the change just moves the exception object extraction to local variable after the problematic callback to debugger / profiler.

Fixes #132462

## Summary

- Protect the exception `OBJECTREF` in `CallFilterFunclet` and
`CallCatchFunclet` while profiler, debugger, and ETW callbacks may
permit GC, through the subsequent funclet invocation.
- Extend the existing exception profiler test to exercise both filter
and catch funclet paths while exception monitoring is enabled.

## Testing

- Confirmed the regression test fail-fasts against the unfixed checked
runtime.
- Built CoreCLR checked successfully with no warnings or errors.
- Ran the targeted `ExceptionTest` against the fixed checked runtime; it
returned 100 and reported `PROFILER TEST PASSES`.

> [!NOTE]
> This description was generated with GitHub Copilot.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d1145d75-6c1d-4d53-8793-ea41900a04ca
Copilot-Session: 6a0f5fb2-4a96-4a7e-8f6a-37bb262a1401
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added the area-ExceptionHandling-coreclr only use for closed issues label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ExceptionHandling-coreclr only use for closed issues Servicing-consider Issue for next servicing release review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants