Skip to content

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

Description

@myroot

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

Activity

  1. changed the title [-][arm] Different HashCode on the same virtual method[/-] [+][ARM32] Different HashCode on the same virtual method[/+] on Aug 2, 2017
  2. drieseng commented on Aug 23, 2017

    @drieseng
    Contributor

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

  3. jkotas commented on Aug 23, 2017

    @jkotas
    Member

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

  4. reopened this on Aug 23, 2017
  5. parjong commented on Aug 23, 2017

    @parjong
    Contributor

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

  6. drieseng commented on Aug 23, 2017

    @drieseng
    Contributor

    @parjong Missed that. My bad.

  7. transferred this issue fromdotnet/coreclron Jan 31, 2020
  8. ghost locked as resolved and limited conversation to collaborators on Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions