Skip to content

The second argument of System.Runtime.Intrinsics.X86.Sse42.Crc32 method can not be "dereference" ? #11709

Closed

Description

@differentrain
dotnet --version
3.0.100-preview-009844
unsafe static void Main()
{
    var ul = 0UL;
    var ui = 0U;

    ulong* ulP = &ul;
    uint* uiP = &ui;

    //output 0
    Console.WriteLine(Sse42.Crc32(ui, ui).ToString("X"));
    //output 0
    Console.WriteLine(Sse42.X64.Crc32(ul, ul).ToString("X"));
    //output 0
    Console.WriteLine(Sse42.Crc32(*uiP, ui).ToString("X"));
    //output 0
    Console.WriteLine(Sse42.X64.Crc32(*ulP, ul).ToString("X"));

    /*
     * System.AccessViolationException:
     * “Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
    Console.WriteLine(Sse42.Crc32(*uiP, *uiP).ToString("X"));
    Console.WriteLine(Sse42.X64.Crc32(*ulP, *ulP).ToString("X"));
    Console.WriteLine(Sse42.Crc32(*uiP, *uiP).ToString("X"));
    Console.WriteLine(Sse42.X64.Crc32(*ulP, *ulP).ToString("X"));
     */
}

Activity

  1. jkotas commented on Dec 24, 2018

    @jkotas
    Member
  2. fiigii commented on Dec 25, 2018

    @fiigii
    Contributor

    I guess this possibly is an emitter (instruction encoding) issue. Currently, we have a few instructions that take GPR operands are incorrectly encoded on containment form, e.g., https://github.com/dotnet/coreclr/issues/18553. I planned to fix it in the next steps.

    Let me look into it after I get back from vacation. @jkotas Could you please assign this issue to me?

  3. transferred this issue fromdotnet/coreclron Jan 31, 2020
  4. added this to the 3.0 milestone on Jan 31, 2020
  5. ghost locked as resolved and limited conversation to collaborators on Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrbug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions