Skip to content

coop-threads: stack allocation in __wasm_init_async_task is incomplete #810

Closed

Description

@alexcrichton

First added in #799, the current __wasm_init_async_task is buggy for a few reasons:

  • The raw return value of malloc is used as a stack pointer. This has two consequences:
    • A NULL return value isn't checked
    • The stack starts at the bottom, not the top
  • The stack size is arbitrarily chosen as 131072 for now, but this should probably be configurable

Activity

  1. alexcrichton commented on Jul 27, 2026

    @alexcrichton
    CollaboratorAuthor

    Resolved in #854 where the answer is now "no stack is allocated"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions