We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0985259 commit 70b6a0cCopy full SHA for 70b6a0c
src/vm/wasmtime.c
@@ -315,8 +315,12 @@ ngx_wasm_wasmtime_malloc(ngx_log_t *log, int32_t size)
315
found = wasmtime_instance_export_get(cur_plugin->context, &cur_plugin->instance,
316
"proxy_on_memory_allocate", 24, &func);
317
if (!found) {
318
- ngx_log_error(NGX_LOG_ERR, log, 0, "can't find malloc in the WASM plugin");
319
- return 0;
+ found = wasmtime_instance_export_get(cur_plugin->context, &cur_plugin->instance,
+ "malloc", 6, &func);
320
+ if (!found) {
321
+ ngx_log_error(NGX_LOG_ERR, log, 0, "can't find malloc in the WASM plugin");
322
+ return 0;
323
+ }
324
}
325
326
params[0].kind = WASMTIME_I32;
0 commit comments