Repository navigation
Keep invalid type references live in Loader negative tests - #136540
Merged
Merged
Conversation
Since #135802, ReadyToRun no longer emits restoration fixups for type tokens the JIT folds away, so tests that relied on `ldtoken X; pop` or a dead `new F2()` to trigger a TypeLoadException stopped throwing under R2R. Consume the references so the type load still happens. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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. |
davidwrighton
approved these changes
Oct 27, 2026
lewing
enabled auto-merge (squash)
October 27, 2026 20:36
jkotas
reviewed
Oct 27, 2026
jkotas
reviewed
Oct 27, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
jkotas
approved these changes
Oct 27, 2026
Member
Author
|
/ba-g mac storage account auth failures are unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #135802, ReadyToRun no longer emits restoration fixups for type tokens that the JIT folds away. Several Loader negative tests relied on an unused type reference to trigger a
TypeLoadException. Under R2R that reference is gone, so the exception never fires:MethodFlags,UnimplementedAbstractMethodOnConcreteClass,VarianceSafety:ldtoken X; popInternalMethodImplTest:var f2 = new F2();with the result unusedAs @jkotas noted on #136494, the new behavior is acceptable: we don't guarantee identical behavior for invalid IL or metadata across codegen strategies. This PR updates the tests so the type reference is actually used. The
ldtokenresult now goes throughStatics.MakeName(RuntimeTypeHandle), andnew F2()is passed toGC.KeepAlive.TypeHierarchyTest,TypeHierarchyTest_minimal,MultipleMethodImplRecordsSameMethodDeclandUnimplementedAbstractMethodOnAbstractClassare left unchanged. #136494 attributes their failures to the failure countMethodFlagscarries over in the merged runner.Validation
On osx-arm64 Checked, after
./build.sh clr+libs -lc release -rc checked, I built each test withsrc/tests/build.sh -Test <proj> -priority1 checked. I then R2R-compiled the test and its dependencies with Core_Root'scrossgen2and ran it withcorerun:In JIT mode,
MethodFlagsandInternalMethodImplTestpassed before and after the change. I didn't run the four unchanged tests above, the WASI leg, or composite mode.Resolves #136494
Resolves #136534
Note
This PR description was drafted with GitHub Copilot.