Skip to content

Provide a guarantee on unmapped memory region (null region) #1831

Closed
@ishitatsuyuki

Description

@ishitatsuyuki

Most OS implement safeguards on null arithmetic, by reserving the first memory pages as unmapped (reference).

It's good to guarantee some amount of spaces, to enable the use of raw pointers with small enum. (By the way, you have 16 bits to play with on amd64.)

For example, this one is currently UB. At least one page of width would be good to implement those enum-like structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions