Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Jan 4, 2026

Relax assert condition

@dotnet-policy-service
Copy link
Contributor

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

@jkotas
Copy link
Member Author

jkotas commented Jan 4, 2026

Fixing test failures in outer loop, e.g. https://dev.azure.com/dnceng-public/public/_build/results?buildId=1242629&view=ms.vss-test-web.build-test-results-tab&runId=34586056&paneView=debug&resultId=120695 : Assertion failed. elementType >= EETypeElementType.Boolean && elementType <= EETypeElementType.Double

@jkotas
Copy link
Member Author

jkotas commented Jan 4, 2026

/azp run runtime-nativeaot-outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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 relaxes an assertion condition in the GetNormalizedIntegralArrayElementType method to fix a regression. The assertion is changed from checking a specific range of valid element types to checking that the element type value is less than 32.

Key Changes

  • Replaced a range check assertion (elementType >= Boolean && elementType <= Double) with a bounds check ((int)elementType < 32)
  • Added a comment explaining that the shift operator uses only the low-order five bits of the right-hand operand

@jkotas
Copy link
Member Author

jkotas commented Jan 5, 2026

/ba-g deadletter

@jkotas jkotas merged commit 201e6c6 into dotnet:main Jan 5, 2026
121 of 129 checks passed
@jkotas jkotas deleted the fix-regression branch January 5, 2026 07:09
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