Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Fix NullReferenceException in VTable computation - #1527

Merged
nattress merged 1 commit into
dotnet:masterfrom
nattress:master
Jul 18, 2016
Merged

nattress merged 1 commit into
dotnet:masterfrom
nattress:master

Conversation

@nattress

Copy link
Copy Markdown
Contributor

Fix NullReferenceException in
MetadataVirtualMethodAlgorithm.FindBaseUnificationGroup where the
separateMethods variable is constructed on demand and later assumed to
have an instance when it's possible it won't.

@nattress

Copy link
Copy Markdown
Contributor Author

@davidwrighton PTAL

@MichalStrehovsky

Copy link
Copy Markdown
Member

Can you add a regression unit test?

@nattress

Copy link
Copy Markdown
Contributor Author

I added a regression test

}

[Fact]
public void TestFindBaseUnificationGroup()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other virtual function overriding tests are in VirtualFunctionOverrideTests.cs. The file you're modifying is testing odd functionalities I only added because David asked me to.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nattress Once you move this block to the other file too, the tests LGTM.

The functionality change should still be reviewed by @davidwrighton. I lack expertise in that part of the codebase.

Fix NullReferenceException in MetadataVirtualMethodAlgorithm.FindBaseUnificationGroup where the separateMethods variable is constructed on demand and later assumed to have an instance when it's possible it won't.
Add regression test
@nattress

Copy link
Copy Markdown
Contributor Author

@davidwrighton This is the same code you signed off on internally but your blessing here too for the records would be appreciated :)

@davidwrighton

Copy link
Copy Markdown
Member

LGTM

@nattress
nattress merged commit 3fbbfb3 into dotnet:master Jul 18, 2016
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.

4 participants