Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add some IL validity checks to interpreter - #120682

#120682
Merged
janvorli merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
janvorli:il-validity-checksjanvorli/runtime:il-validity-checksCopy head branch name to clipboard
Oct 14, 2025
Merged

Add some IL validity checks to interpreter#120682
janvorli merged 1 commit into
dotnet:maindotnet/runtime:mainfrom
janvorli:il-validity-checksjanvorli/runtime:il-validity-checksCopy head branch name to clipboard

Conversation

@janvorli

Copy link
Copy Markdown
Member

This change adds validity checks that calls BADCODE around some EH stuff and varargs calls and also replaces assert(0) in the primitive type conversion operations with BADCODE calls for the cases when invalid type conversions are requested.

This change adds validity checks that calls BADCODE around some EH stuff
and varargs calls and also replaces assert(0) in the primitive type
conversion operations with BADCODE calls for the cases when invalid type
conversions are requested.
@janvorli janvorli added this to the 11.0.0 milestone Oct 13, 2025
@janvorli janvorli self-assigned this Oct 13, 2025
@janvorli
janvorli requested review from BrzVlad and kg as code owners October 13, 2025 23:41
Copilot AI review requested due to automatic review settings October 13, 2025 23:41
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances IL validity checks in the interpreter by adding error handling for unsupported operations and invalid IL code patterns. The changes replace assert(0) calls with proper BADCODE error reporting and add validation for exception handling constructs and method calls.

Key changes:

  • Adds validation for proper termination of emitted instruction sequences
  • Introduces checks for unsupported varargs method calls
  • Replaces assertion failures with descriptive BADCODE error messages for invalid type conversions

Comment thread src/coreclr/interpreter/compiler.cpp
Comment thread src/coreclr/interpreter/compiler.cpp
@janvorli
janvorli merged commit 7f76bea into dotnet:main Oct 14, 2025
94 of 97 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.