Skip to content

Commit b31ae6f

Browse files
committed
fix go runtime gc
1 parent cde187a commit b31ae6f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

include/proxy-wasm/wasm.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ inline void *WasmBase::allocMemory(uint64_t size, uint64_t *address) {
464464
// logging (stdout/stderr)
465465
"wasi_unstable.fd_write", "wasi_snapshot_preview1.fd_write",
466466
// time
467-
"wasi_unstable.clock_time_get", "wasi_snapshot_preview1.clock_time_get"});
467+
"wasi_unstable.clock_time_get", "wasi_snapshot_preview1.clock_time_get",
468+
// go runtime gc sleep
469+
"wasi_unstable.poll_oneoff"});
468470
Word a = malloc_(vm_context(), size);
469471
wasm_vm_->setRestrictedCallback(false);
470472
if (!a.u64_) {

src/wasm.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ void WasmBase::startVm(ContextBase *root_context) {
417417
// Go runtime initialization
418418
"wasi_unstable.fd_fdstat_get", "wasi_snapshot_preview1.fd_fdstat_get",
419419
"wasi_unstable.fd_fdstat_set_flags", "wasi_snapshot_preview1.fd_fdstat_set_flags",
420-
"wasi_unstable.path_filestat_get", "wasi_unstable.fd_filestat_get"});
420+
"wasi_unstable.path_filestat_get", "wasi_unstable.fd_filestat_get",
421+
"wasi_unstable.poll_oneoff"});
421422
if (_initialize_) {
422423
// WASI reactor.
423424
_initialize_(root_context);

0 commit comments

Comments
 (0)