Skip to content

Conversation

@janvorli
Copy link
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
Contributor

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

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 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

@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.

2 participants