This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
Add a test for #2260 - #2263
Merged
Merged
Add a test for #2260#2263
Conversation
This uncovers a null ref in sweepstep. The test is order dependent: - Assembly (librarywithnonemtpy) has a virtual method which referes to type from second library (library). This processes the type reference. - The type is removed from library - The virtual method is re-processed again -> hits a type def which does not belong to any assembly/scope For this to happen the virtual method must be processed after the type has been removed. This also requires the method to be meant for removal later on (the body will be rewritten to throw), since otherwise the type would have been marked. This also requires the library with the removed type to be kept (so something else in it must be kept).
marek-safar
approved these changes
Sep 7, 2021
sbomer
approved these changes
Sep 7, 2021
|
|
||
| namespace Mono.Linker.Tests.Cases.Inheritance.AbstractClasses.NoKeptCtor.OverrideRemoval.Dependencies | ||
| { | ||
| public class OverrideOfAbstractIsKeptNonEmptyLibraryWithNonEmpty : |
Member
There was a problem hiding this comment.
nit: I'm not sure what the "non-empty" in NonEmptyLibrary or WithNonEmpty refer to - maybe the names could be simplified?
Member
Author
There was a problem hiding this comment.
The idea was to keep the names starting with the name of the test - so that it's easy to tell which dependencies belong to which test.
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
This uncovers a null ref in sweepstep. The test is order dependent: - Assembly (librarywithnonemtpy) has a virtual method which referes to type from second library (library). This processes the type reference. - The type is removed from library - The virtual method is re-processed again -> hits a type def which does not belong to any assembly/scope For this to happen the virtual method must be processed after the type has been removed. This also requires the method to be meant for removal later on (the body will be rewritten to throw), since otherwise the type would have been marked. This also requires the library with the removed type to be kept (so something else in it must be kept). Commit migrated from dotnet/linker@43fb979
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This uncovers a null ref in sweepstep.
The test is order dependent:
For this to happen the virtual method must be processed after the type has been removed.
This also requires the method to be meant for removal later on (the body will be rewritten to throw), since otherwise the type would have been marked.
This also requires the library with the removed type to be kept (so something else in it must be kept).