Skip to content

runtime: next release of OpenBSD requires MAP_STACK for stacks #26142

@aclements

Description

@aclements

As announced in http://openbsd-archive.7691.n7.nabble.com/stack-register-checking-td338238.html, the upcoming release of OpenBSD is going to start requiring that the SP points to memory that was mapped with MAP_STACK on system call entry, traps, and when switching to the alternate signal stack. This breaks with the current version of Go because we don't map any memory MAP_STACK.

Fixing this is somewhat tricky given how tightly we allocate stacks and that they are interwoven with heap memory. However, they're not interwoven below page granularity, so it should be possible to fix this by remapping memory whenever a span transitions to or from being used to allocate stacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-OpenBSD

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions