Skip to content

initblk incorrectly handles 0 fill on ARM64 #13579

@mikedn

Description

@mikedn

The fill values passed to initblk is supposed to be a byte but ARM64 block store lowering fails to mask the upper bytes resulting in incorrect initialization:

ldloca V_0
ldc.i4 0x11100
ldc.i4 15
initblk

generates:

52822000          movz    w0, #0x1100
72A00020          movk    w0, dotnet/coreclr#1 LSL dotnet/coreclr#16
9101C3A1          add     x1, fp, dotnet/coreclr#112  // [V05 loc0]
F9000020          str     x0, [x1]     ; stores 0x0000000000011100
B9000820          str     w0, [x1,#8]  ; stores 0x00011100
79001820          strh    w0, [x1,#12] ; stores 0x1100
39003820          strb    w0, [x1,#14] ; stores 0x00

dotnet/coreclr#27035 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-arm64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions