Skip to content

Conversation

MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Aug 28, 2025

dotnet/runtimelab#893 (comment) better 4 years late than never I guess.

Cc @dotnet/ilc-contrib

dotnet/runtimelab#893 (comment) better 4 years late than never I guess.

I haven't untangled this fully out of RiscV/Loongarch/Arm yet. Should have done this long time ago.
@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@MichalPetryka
Copy link
Contributor

Is this not needed for ControlledExecution.Run?

@jkotas
Copy link
Member

jkotas commented Aug 28, 2025

ControlledExecution.Run is not supported for Native AOT. ControlledExecution.Run is meant to be only used by non-production interactive dynamic scenarios like interactive shells or interactive debuggers that do not make sense for Native AOT.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@am11
Copy link
Member

am11 commented Sep 2, 2025

Smoke tests passed with PR branch.
linux-riscv64 https://github.com/am11/CrossRepoCITesting/actions/runs/17395263115
linux-musl-riscv64 https://github.com/am11/CrossRepoCITesting/actions/runs/17395260352

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky MichalStrehovsky marked this pull request as ready for review September 2, 2025 13:43
@Copilot Copilot AI review requested due to automatic review settings September 2, 2025 13:43
Copy link
Contributor

@Copilot 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 ThreadAbort support from native AOT runtime, completing a long-overdue cleanup of functionality that was partially implemented but never fully functional. The changes systematically eliminate thread abort-related code across all platform architectures, runtime components, and managed interfaces.

Key changes:

  • Removed ThreadAbort exception support from the runtime and managed interfaces
  • Cleaned up thread abort flags, constants, and state tracking across all architectures
  • Simplified exception handling paths by removing thread abort checks
  • Updated frame handling to remove thread abort-specific processing

Reviewed Changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
RuntimeImports.cs Removed ThreadAbort-related native method imports
threadstore.h/.cpp Removed ThreadAbort initiation and cancellation methods
thread.h/.cpp Removed ThreadAbort exception storage and accessors
Assembly files (multiple architectures) Removed PTFF_THREAD_ABORT flags, constants, and abort handling code
Exception handling files Removed ThreadAbort exception checks and rethrow logic
InternalCalls.cs Removed ThreadAbort exception getter
ExceptionHandling.cs Removed ThreadAbort exception creation and handling

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks!

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/ba-g the failing outerloop tests are fixed in #119312

@MichalStrehovsky MichalStrehovsky merged commit dec6686 into dotnet:main Sep 3, 2025
113 of 119 checks passed
@MichalStrehovsky MichalStrehovsky deleted the threadabort branch September 3, 2025 12:57
filipnavara pushed a commit to filipnavara/runtime that referenced this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants