Skip to content

Avoid UB object reinterpret in builtin marshalling. #130427

Description

@MichalPetryka

See #130279 (comment)

The safest solution would be to use a pinned local for the object reference (those are valid in IL) and then conv.u the object reference and add data offset to the pointer.

cc @MichalStrehovsky @AaronRobinsonMSFT do you maybe want to use copilot on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions