Sam Clegg

Results 1123 comments of Sam Clegg

IIUC that would no longer be conforming to the wasm spec. For example, its perfectly valid in wasm to write a function like `search_entire_memory_for_string(const char* needle)`. If you had a...

> > WAMR performs boundary checks by intercepting global.set __stack_pointer. > > Yes, and I think this check will have to be disabled for spawned threads. > > I think...

There have be times when we have discussed deeper integration of binaryen with llvm, but I don't know of any immediate plans.

CC @kripken and @dschuff who have discussed deeper integration in that past.

The `--check-stack-overflow` pass in wasm-opt generates start and end globals for the stack and also a function for setting them: https://github.com/WebAssembly/binaryen/blob/main/src/passes/StackCheck.cpp#L37. Each new thread would need to somehow call this...

Seems reasonable yes, this limitation can always be relaxed/widened later if we have things like multi-memory, but we are not there yet.

In terms of the browsers I don't think it makes any difference if we build `join` out of existing atomics to call an import. Anyone targeting the main browser thread...

BTW, in emscripten we use the posixtestsuite of pthread tests to test conformance: https://github.com/emscripten-core/posixtestsuite (forked from http://posixtest.sourceforge.net/). Obviously we have to exclude a good chuck of it that we don't...

BTW, how sure are folks that `join` can be implemented in user space? I'm *think* I've convinced myself its possible. @lukewagner you seemed pretty sure?