Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM32] Different HashCode on the same virtual method #8671

Closed
myroot opened this issue Aug 2, 2017 · 4 comments · Fixed by dotnet/coreclr#13513
Closed

[ARM32] Different HashCode on the same virtual method #8671

myroot opened this issue Aug 2, 2017 · 4 comments · Fixed by dotnet/coreclr#13513

Comments

@myroot
Copy link

myroot commented Aug 2, 2017

I get different hashcode on the same action that assigend from same virtual method

class Program
{
    public virtual void VirtualMethod() { }

    public void NonVirtualMethod() { }


    static void Main(string[] args)
    {
        Program p = new Program();
        Action d1 = p.VirtualMethod;
        Action d2 = p.VirtualMethod;

        Action d3 = p.NonVirtualMethod;
        Action d4 = p.NonVirtualMethod;
        
        Console.WriteLine("d1.GetHashCode() == d2.GetHashCode() {0}", d1.GetHashCode() == d2.GetHashCode());
        Console.WriteLine("d3.GetHashCode() == d4.GetHashCode() {0}", d3.GetHashCode() == d4.GetHashCode());
    }
}

d1.GetHashCode() == d2.GetHashCode() False
d3.GetHashCode() == d4.GetHashCode() True

@myroot myroot changed the title [arm] Different HashCode on the same virtual method [ARM32] Different HashCode on the same virtual method Aug 2, 2017
parjong referenced this issue in parjong/coreclr Aug 22, 2017
@drieseng
Copy link
Contributor

@parjong Have you submitted a separate issue for the new test case?

@jkotas
Copy link
Member

jkotas commented Aug 23, 2017

Good point. @parjong Could you please add the test case for this if there is not one already?

@jkotas jkotas reopened this Aug 23, 2017
@parjong
Copy link
Contributor

parjong commented Aug 23, 2017

@jkotas I already did. Please take a look at dotnet/coreclr#13531.

@drieseng
Copy link
Contributor

@parjong Missed that. My bad.

@jkotas jkotas closed this as completed Aug 23, 2017
@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants