Skip to content

Box helpers do not handle null-valued managed pointers #70268

Closed
@jakobbotsch

Description

@jakobbotsch

The box helpers currently do not handle null refs inside of them. This should be fixed if we are making null-valued managed pointers legal (#69690). Repro:

object val = Unsafe.NullRef<Guid>();

Expected: NullReferenceException thrown
Actual: Fatal error. Internal CLR error. (0x80131506)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions