Skip to content

Update the documentation about C/C++ toolchain limitations.#117

Merged
sunfishcode merged 1 commit intobytecodealliance:masterfrom
sunfishcode:docs-toolchain
Apr 28, 2019
Merged

Update the documentation about C/C++ toolchain limitations.#117
sunfishcode merged 1 commit intobytecodealliance:masterfrom
sunfishcode:docs-toolchain

Conversation

@sunfishcode
Copy link
Member

Document that setjmp/longjmp and C++ exceptions are unsupported, and
update the documentation about the function signature mismatch bug to
reflect that it's now just a warning rather than a fatal error.

Document that `setjmp`/`longjmp` and C++ exceptions are unsupported, and
update the documentation about the function signature mismatch bug to
reflect that it's now just a warning rather than a fatal error.
@sunfishcode sunfishcode merged commit 29c2616 into bytecodealliance:master Apr 28, 2019
@sunfishcode sunfishcode deleted the docs-toolchain branch April 28, 2019 23:42
grishasobol pushed a commit to grishasobol/wasmtime that referenced this pull request Nov 29, 2021
pchickey added a commit to pchickey/wasmtime that referenced this pull request May 16, 2023
…ppable_for_real_this_time

Use trappable errors in host bindings for wasi-filesystem
mooori pushed a commit to mooori/wasmtime that referenced this pull request Dec 20, 2023
dhil added a commit to dhil/wasmtime that referenced this pull request Mar 1, 2024
This PR addresses an issue discussed in bytecodealliance#109:
Correctly handling the case where we re-enter wasm while already on a
continuation stack is difficult. For the time being, we therefore
disallow this. This PR adds the necessary logic to detect this.

Concretely, in `invoke_wasm_and_catch_traps`, we inspect the chain of
nested wasm (+ host) invocations, represented by the linked list of
`CallThreadState` objects maintained in `wasmtime_runtime:traphandlers`.
To this end, for those `CallThreadState` objects that represent
execution of wasm, we store a pointer to the corresponding `Store`'s
`StackChainCell`.

Please note that the diff of the test file `typed_continuations.rs`
looks unnecessarily scary: I moved the existing tests into a module
`wasi`, and added modules `test_utils` and `host`.

---------

Co-authored-by: Daniel Hillerström <daniel.hillerstrom@ed.ac.uk>
frank-emrich added a commit to frank-emrich/wasmtime that referenced this pull request Mar 6, 2024
…aces (bytecodealliance#119)

This PR finalizes the implementation of backtrace creation in the
presence of wasmfx stack switching. The only piece missing after this PR
is testing, which I'm adding in a separate PR.

As of bytecodealliance#117, it is already the case that each `CallThreadState` executing
wasm stores a pointer to the underlying `Store`'s `StackChainCell`.

This PR changes the existing creation of backtraces in `backtrace.rs` as
follows:
Previously, `trace_with_trap_state` would call 
call `trace_through_wasm` for the faulting program position plus all the
entries in the current thread's `CallThreadState` chain.
Now, instead of calling `trace_through_wasm` directly,
`trace_with_trap_state` calls a new function
`trace_through_continuations`. The latter takes an optional `StackChain`
and iterates all the stacks (= continuation stacks + main stack)
therein, calling `trace_through_wasm` for each such stack. If no such
`StackChain` is given, it just behaves as before. Note that the
invariant established in bytecodealliance#117 ensures that only the most recent
execution of wasm may actually be inside a continuation, while all
previous `CallThreadState`s must be on the main stack.

As a result, we only ever call `trace_through_wasm` such that the old
invariants (which we had commented out at some point) hold again: Its
parameters `trampoline_sp` and `fp` describe a continuous (!) sequence
of stack memory, either on the main stack or inside a `Fiber` stack.
Further, we have `trampoline_sp` > `fp` and following the frame pointer
chain starting at `fp` eventually leads to a pointer past (= greater or
equal than) `trampoline_sp`.

---------

Co-authored-by: Daniel Hillerström <daniel.hillerstrom@ed.ac.uk>
avanhatt pushed a commit to wellesley-prog-sys/wasmtime that referenced this pull request Oct 9, 2024
Adds library functions for manipulating opcode templates.

Updates #36
dicej pushed a commit to dicej/wasmtime that referenced this pull request Apr 16, 2025
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this pull request Oct 8, 2025
bongjunj pushed a commit to prosyslab/wasmtime that referenced this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant