Skip to content

Commit

Permalink
chore(deps) bump Wasmer to 4.2.0
Browse files Browse the repository at this point in the history
Co-Authored-By: Hisham Muhammad <[email protected]>
  • Loading branch information
thibaultcha and hishamhm committed Sep 12, 2023
1 parent d1c296f commit 8a58e49
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
ngx: [1.25.2]
runtime: [wasmtime, wasmer, v8]
wasmtime: [12.0.1]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [11.4.183.23]
debug: [debug, no_debug]
hup: [hup, no_hup]
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
ngx: [1.25.2]
runtime: [wasmer, wasmtime, v8]
wasmtime: [12.0.1]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [11.4.183.23]
hup: [hup, no_hup]
debug: [debug]
Expand All @@ -80,7 +80,7 @@ jobs:
cc: gcc-10
openresty: 1.21.4.2
runtime: wasmer
wasmer: 3.1.1
wasmer: 4.2.0
debug: debug
hup: no_hup
uses: ./.github/workflows/job-valgrind-tests.yml
Expand All @@ -107,7 +107,7 @@ jobs:
openresty: [1.21.4.2]
runtime: [wasmtime, wasmer, v8]
wasmtime: [12.0.1]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [11.4.183.23]
ssl: [no_ssl, ssl]
debug: [debug, no_debug]
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
openresty: [""]
runtime: [wasmer]
wasmtime: [""]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [""]
ssl: [ssl]
debug: [debug, no_debug]
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
cc: gcc-9
ngx: 1.21.6
runtime: wasmer
wasmer: 3.1.1
wasmer: 4.2.0
ssl: ssl
debug: debug
hup: no_hup
Expand All @@ -84,7 +84,7 @@ jobs:
cc: gcc-9
ngx: 1.25.2
runtime: wasmer
wasmer: 3.1.1
wasmer: 4.2.0
ssl: no_ssl
debug: no_debug
hup: no_hup
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
openresty: [""]
runtime: [wasmer]
wasmtime: [""]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [""]
hup: [no_hup, hup]
debug: [debug]
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
openresty: 1.21.4.2
ngx:
runtime: wasmer
wasmer: 3.1.1
wasmer: 4.2.0
debug: debug
hup: no_hup
uses: ./.github/workflows/job-valgrind-tests.yml
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
openresty: [1.21.4.2]
runtime: [wasmtime, wasmer, v8]
wasmtime: [12.0.1]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [11.4.183.23]
ssl: [ssl]
debug: [debug, no_debug]
Expand All @@ -254,7 +254,7 @@ jobs:
cc: clang-11
ngx: 1.25.2
runtime: wasmer
wasmer: 3.1.1
wasmer: 4.2.0
ssl: no_ssl
debug: debug
uses: ./.github/workflows/job-clang-analyzer.yml
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
ngx: [1.25.2]
runtime: [wasmtime, wasmer, v8]
wasmtime: [12.0.1]
wasmer: [3.1.1]
wasmer: [4.2.0]
v8: [11.4.183.23]
include:
- label: old_nginx
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NGX ?= 1.25.2
OPENSSL ?= 3.1.2
WASMTIME ?= 12.0.1
WASMER ?= 3.1.1
WASMER ?= 4.2.0
V8 ?= 11.4.183.23
PCRE ?= 8.45
ZLIB ?= 1.2.13
Expand Down
4 changes: 2 additions & 2 deletions src/wasm/wrt/ngx_wrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ void ngx_wasmtime_valvec2wasm(wasm_val_vec_t *out, wasmtime_val_t *vec,
#elif NGX_WASM_HAVE_WASMER
#include <wasmer.h>

#if WASMER_VERSION_MAJOR != 3
#if WASMER_VERSION_MAJOR != 4
# error Unsupported Wasmer version
#elif WASMER_VERSION_MINOR > 1
#elif WASMER_VERSION_MINOR > 2
# warning Untested Wasmer version
#endif

Expand Down
13 changes: 8 additions & 5 deletions src/wasm/wrt/ngx_wrt_wasmer.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,14 @@ ngx_wasmer_init_instance(ngx_wrt_instance_t *instance, ngx_wrt_store_t *store,

instance->ctxs = hctxs;

if (module->wasi
&& !wasi_env_initialize_instance(store->wasi_env, store->store,
instance->instance))
{
dd("wasi_env_initialize_instance failed");
goto error;
}

return NGX_OK;

error:
Expand Down Expand Up @@ -690,11 +698,6 @@ ngx_wasmer_init_extern(ngx_wrt_extern_t *ext, ngx_wrt_instance_t *instance,
ngx_wasm_assert(wasm_extern_kind(ext->ext) == WASM_EXTERN_MEMORY);
ext->kind = NGX_WRT_EXTERN_MEMORY;
instance->memory = wasm_extern_as_memory(ext->ext);

if (module->wasi) {
wasi_env_set_memory(instance->store->wasi_env, instance->memory);
}

break;

case WASM_EXTERN_GLOBAL:
Expand Down
6 changes: 3 additions & 3 deletions valgrind.suppress
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
fun:ngx_crc32_table_init
}
{
<wasmer 3.1.1: parse>
<wasmer 4.2.0: parse>
Memcheck:Cond
fun:_ZN10wasmparser6parser6Parser5parse17h*
...
fun:main
}
{
<wasmer 3.1.1: wasm_instance_new>
<wasmer 4.2.0: wasm_instance_new>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
Expand All @@ -38,7 +38,7 @@
fun:wasm_instance_new
}
{
<wasmer 3.1.1: wasm_module_new>
<wasmer 4.2.0: wasm_module_new>
Memcheck:Leak
match-leak-kinds: possible
fun:calloc
Expand Down

0 comments on commit 8a58e49

Please sign in to comment.