Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasmtime: lift fiber creation implementation into instance allocator #2708

Closed
peterhuene opened this issue Mar 5, 2021 · 1 comment · Fixed by #2741
Closed

Wasmtime: lift fiber creation implementation into instance allocator #2708

peterhuene opened this issue Mar 5, 2021 · 1 comment · Fixed by #2741
Assignees
Labels
wasmtime Issues about wasmtime that don't fall into another label

Comments

@peterhuene
Copy link
Member

Once #2518 lands, we should lift the fiber creation implementation out of the wasmtime-fiber crate and into the instance allocator implementation.

This will fix the bit wonky "not supported" error the instance allocator returns to indicate the fiber crate should create its own fiber.

@peterhuene peterhuene added the wasmtime Issues about wasmtime that don't fall into another label label Mar 5, 2021
@peterhuene peterhuene self-assigned this Mar 5, 2021
@peterhuene
Copy link
Member Author

In addition to this, we should add a test case that hits a fiber stack guard page and ensures a crash with both the on-demand and pooling instance allocators.

peterhuene added a commit to peterhuene/wasmtime that referenced this issue Mar 19, 2021
This commit splits out a `FiberStack` from `Fiber`, allowing the instance
allocator trait to return `FiberStack` rather than raw stack pointers. This
keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand
instance allocator can make use of it.

The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.

This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.

Closes bytecodealliance#2708.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Mar 19, 2021
This commit splits out a `FiberStack` from `Fiber`, allowing the instance
allocator trait to return `FiberStack` rather than raw stack pointers. This
keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand
instance allocator can make use of it.

The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.

This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.

Closes bytecodealliance#2708.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Mar 19, 2021
This commit splits out a `FiberStack` from `Fiber`, allowing the instance
allocator trait to return `FiberStack` rather than raw stack pointers. This
keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand
instance allocator can make use of it.

The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.

This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.

Closes bytecodealliance#2708.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Mar 19, 2021
This commit splits out a `FiberStack` from `Fiber`, allowing the instance
allocator trait to return `FiberStack` rather than raw stack pointers. This
keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand
instance allocator can make use of it.

The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.

This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.

Closes bytecodealliance#2708.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Mar 19, 2021
This commit splits out a `FiberStack` from `Fiber`, allowing the instance
allocator trait to return `FiberStack` rather than raw stack pointers. This
keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand
instance allocator can make use of it.

The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.

This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.

Closes bytecodealliance#2708.
peterhuene added a commit to peterhuene/wasmtime that referenced this issue Mar 19, 2021
This commit splits out a `FiberStack` from `Fiber`, allowing the instance
allocator trait to return `FiberStack` rather than raw stack pointers. This
keeps the stack creation mostly in `wasmtime_fiber`, but now the on-demand
instance allocator can make use of it.

The instance allocators no longer have to return a "not supported" error to
indicate that the store should allocate its own fiber stack.

This includes a bunch of cleanup in the instance allocator to scope stacks to
the new "async" feature in the runtime.

Closes bytecodealliance#2708.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime Issues about wasmtime that don't fall into another label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant