-
Notifications
You must be signed in to change notification settings - Fork 36
Description
In #95, a test was added that pwrite implements POSIX semantics (https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html). Note that Linux deviates from POSIX, ignoring the "offset" argument for append-only files, instead always writing at the end: https://linux.die.net/man/2/pwrite. Wasmtime used to paper over this Linux behavior, choosing POSIX instead, but in bytecodealliance/wasmtime#8823 decided to choose the Linux behavior over POSIX, to align with Linux native, as well as WAMR and WasmEdge: bytecodealliance/wasmtime#8817. The justification was that this part of WASI was under-specified, and I think that Linux developers expected Linux pwrite behavior. In the meantime, WasmEdge actually changed their behavior to match wasmtime's old behavior; WasmEdge/WasmEdge#3062.
The current status is that the pwrite-with-append test currently fails on wasmtime, wazero, wamr, while passing on wasmedge and pywasm-runtime.
IMO either option is fine, but it would be good if wasmedge and wasmtime people could come to agreement on this issue :)