Skip to content

Commit 2e96099

Browse files
committed
Remove restricted callback limitations during malloc
1 parent b31ae6f commit 2e96099

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/proxy-wasm/wasm.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,17 @@ inline void *WasmBase::allocMemory(uint64_t size, uint64_t *address) {
458458
if (!malloc_) {
459459
return nullptr;
460460
}
461-
wasm_vm_->setRestrictedCallback(
462-
true, {// logging (Proxy-Wasm)
463-
"env.proxy_log",
464-
// logging (stdout/stderr)
465-
"wasi_unstable.fd_write", "wasi_snapshot_preview1.fd_write",
466-
// time
467-
"wasi_unstable.clock_time_get", "wasi_snapshot_preview1.clock_time_get",
468-
// go runtime gc sleep
469-
"wasi_unstable.poll_oneoff"});
461+
// wasm_vm_->setRestrictedCallback(
462+
// true, {// logging (Proxy-Wasm)
463+
// "env.proxy_log",
464+
// // logging (stdout/stderr)
465+
// "wasi_unstable.fd_write", "wasi_snapshot_preview1.fd_write",
466+
// // time
467+
// "wasi_unstable.clock_time_get", "wasi_snapshot_preview1.clock_time_get",
468+
// // go runtime gc sleep
469+
// "wasi_unstable.poll_oneoff"});
470470
Word a = malloc_(vm_context(), size);
471-
wasm_vm_->setRestrictedCallback(false);
471+
// wasm_vm_->setRestrictedCallback(false);
472472
if (!a.u64_) {
473473
return nullptr;
474474
}

0 commit comments

Comments
 (0)