Skip to content

Make ordinary FCALL contracts nothrow - #133644

Draft
davidwrighton wants to merge 2 commits into
dotnet:mainfrom
davidwrighton:fcall-contract-nothrow
Draft

Make ordinary FCALL contracts nothrow#133644
davidwrighton wants to merge 2 commits into
dotnet:mainfrom
davidwrighton:fcall-contract-nothrow

Conversation

@davidwrighton

Copy link
Copy Markdown
Member

Summary

  • make FCALL_CHECK and ordinary FCALL_CONTRACT statically and dynamically NOTHROW/GC_NOTRIGGER
  • add FCALL_CONTRACT_WITH_FRAME for FCALLs that explicitly establish a frame before exception dispatch
  • use the framed contract for IL_Throw, IL_Rethrow, and IL_ThrowExact, including their WASM wrappers
  • correct the stale MethodDesc::GetName() contract to NOTHROW; the parameterless overload only returns stored names or converts metadata lookup failures to nullptr

The FCALL audit found only the three IL exception helpers directly enabling GC or dispatching managed exceptions. This draft is intended to validate the stronger dynamic contract across the full CI matrix.

Validation

  • build.cmd clr -rc checked
  • Checked-runtime smoke covering throw, rethrow, null throw, runtime handles, arrays, strings, GC, threading, marshaling, and math (exit 100)

Broad local testing was intentionally skipped in favor of the CI matrix.

Note

This pull request description was generated with GitHub Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c7ffdbd-30b8-43ca-9c02-936ca602170c
@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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c7ffdbd-30b8-43ca-9c02-936ca602170c
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.

2 participants