Skip to content

Commit 86a7067

Browse files
committed
Add comment on Go runtime requirements for poll_oneoff
Signed-off-by: Matt Leon <mattleon@google.com>
1 parent 9134071 commit 86a7067

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/exports.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,9 @@ Word wasi_unstable_poll_oneoff(Word /*in*/, Word /*out*/, Word /*nsubscriptions*
12821282
return 21; // __WASI_EFAULT - If there is a failure setting memory
12831283
}
12841284

1285+
// Go runtime requires poll_oneoff to return ESUCCESS. See
1286+
// https://github.com/golang/go/blob/0886e65b119e5be88846b1580451dc2b0d6f6fd0/src/runtime/os_wasip1.go#L186-L188
1287+
// and more context in github.com/proxy-wasm/proxy-wasm-cpp-host/issues/497.
12851288
return 0; // __WASI_ESUCCESS
12861289
}
12871290

0 commit comments

Comments
 (0)