Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/wasmtime/crates/lind-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ fn add_syscall_to_linker<
// If the syscall was interrupted by a signal (EINTR), invoke the signal handler.
// If fork is called within the signal handler, asyncify will unwind the stack;
// we save the syscall return value so it can be restored on rewind.
if -retval == sysdefs::constants::Errno::EINTR as i32 {
// Only negate `retval` if it falls within the valid errno range;
// since negating `I32::MIN` would cause an overflow panic.
if retval < 0 && retval > -256 && -retval == sysdefs::constants::Errno::EINTR as i32 {
caller.as_context_mut().append_syscall_asyncify_data(retval);
wasmtime_lind_multi_process::signal::signal_handler(&mut caller);

Expand Down
1 change: 1 addition & 0 deletions src/wasmtime/crates/wasmtime/src/runtime/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ impl<T> Linker<T> {
| "__wasm_apply_data_relocs"
| "__wasm_apply_global_relocs"
| "__wasm_apply_tls_relocs"
| "__wasm_init_tls"
// asyncify symbols
| "asyncify_start_unwind"
| "asyncify_stop_unwind"
Expand Down