Skip to content

Remove obsolete NativeExceptionHolder#121315

Merged
jkotas merged 1 commit intodotnet:mainfrom
janvorli:remove-obsolete-native-exception-holder
Nov 4, 2025
Merged

Remove obsolete NativeExceptionHolder#121315
jkotas merged 1 commit intodotnet:mainfrom
janvorli:remove-obsolete-native-exception-holder

Conversation

@janvorli
Copy link
Member

@janvorli janvorli commented Nov 3, 2025

This holder was used for the old EH on Unix. Now that the old EH has been removed from the runtime quite some time ago, it is of no use anymore.

This change removes it.

This holder was used for the old EH on Unix. Now that the old EH was
removed from the runtime, it is of no use anymore.

This change removes it.
@janvorli janvorli added this to the 11.0.0 milestone Nov 3, 2025
@janvorli janvorli requested a review from jkotas November 3, 2025 19:31
@janvorli janvorli self-assigned this Nov 3, 2025
Copilot AI review requested due to automatic review settings November 3, 2025 19:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the NativeExceptionHolder exception handling mechanism from the CoreCLR Unix implementation. This mechanism was previously used to track native-to-managed call transitions for exception dispatching.

Key Changes

  • Removed the entire NativeExceptionHolder class hierarchy and associated infrastructure
  • Removed the INSTALL_CALL_TO_MANAGED_EXCEPTION_HOLDER macro usage from call-to-managed transitions
  • Cleaned up thread-local storage and stack tracking code for native exception holders

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/coreclr/vm/callhelpers.h Removed INSTALL_CALL_TO_MANAGED_EXCEPTION_HOLDER macro definition and its invocation in BEGIN_CALL_TO_MANAGEDEX
src/coreclr/pal/src/exception/seh.cpp Removed NativeExceptionHolderBase implementation including thread-local storage and holder lookup functions
src/coreclr/pal/inc/pal.h Removed NativeExceptionHolderBase class declarations, template implementations, and usage in PAL_TRY macro
src/coreclr/inc/ex.h Removed NativeExceptionHolderCatchAll instantiation from EX_TRY_HOLDER macro
src/coreclr/dlls/mscordac/mscordac_unixexports.src Removed export for PAL_GetNativeExceptionHolderHead function

@jkotas
Copy link
Member

jkotas commented Nov 4, 2025

/ba-g infrastructure timeouts on android-arm64

@jkotas jkotas merged commit 9f1cab7 into dotnet:main Nov 4, 2025
101 of 106 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2025
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.

3 participants