Repository navigation
[release/10.0] [CoreCLR] Protect exception object across funclet callbacks - #136708
Conversation
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 <[email protected]> Copilot-Session: d1145d75-6c1d-4d53-8793-ea41900a04ca Copilot-Session: 6a0f5fb2-4a96-4a7e-8f6a-37bb262a1401
|
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. |
|
We are hitting what appears to be this exact issue in production on .NET 10 in Azure App Service. The app crashes intermittently with an access violation when Dynatrace OneAgent is attached. OneAgent registers COR_PRF_MONITOR_EXCEPTIONS when deep monitoring is enabled. Crashes occur only with the profiler attached. Disabling other OneAgent features (CosmosDB sensor) and DATAS (Dynamic Adaptation To Application Sizes) made no difference. Since this is a regression from the .NET 8 EH rewrite that causes heap corruption in production for profiler-monitored apps, could this backport be merged and included in the next 10.0.x servicing release? Could you also share the target version/ETA? |
|
Hi, the code complete date for 10.0.16 (the December 2026 release) is Monday 16 November. Make sure to merge this PR on that date at the latest, or it won't make it into that release. As a reminder, if this is a product change, you also need Tactics approval before merging this PR (test-only or infra-only changes don't require Tactics approval). Happy to help with the merge if needed! |
|
/ba-g unrelated Mutex test failures |
Backport of #132482 to release/10.0
/cc @janvorli @steveisok
Customer Impact
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.