Skip to content

Cannot instantiate a shared memory with a custom page size #9523

Closed

Description

@alexcrichton

Given this module:

(module
  (memory 1 2 shared (pagesize 1))
)

this cannot be instantiated:

$ wasmtime run -Wcustom-page-sizes foo.wat
Error: failed to run main module `foo.wat`

Caused by:
    0: failed to instantiate "foo.wat"
    1: shared memory can only be built from a static memory allocation

This is due to the fact that custom page sizes currently force a "dynamic" memory where the base pointer can change while shared memories are required to be "static" where the base pointer cannot change. Fixing this will require refactoring exactly how memories are represented internally within Wasmtime, but in the meantime I wanted to file an issue about this to have on-hand.

Activity

  1. added 4 commits that reference this issue on Nov 4, 2024
    86fe17f
    1c5a589
    ecb7ede
    cb16230
  2. added a commit that references this issue on Nov 6, 2024
    84852f7
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