Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps) bump Wasmer to 3.3.0 #439

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 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.3]
runtime: [wasmtime, wasmer, v8]
wasmtime: [14.0.3]
wasmer: [3.1.1]
wasmer: [3.3.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.3]
runtime: [wasmer, wasmtime, v8]
wasmtime: [14.0.3]
wasmer: [3.1.1]
wasmer: [3.3.0]
v8: [11.4.183.23]
hup: [hup, no_hup]
debug: [debug]
Expand All @@ -80,7 +80,7 @@ jobs:
cc: gcc-12
openresty: 1.21.4.2
runtime: wasmer
wasmer: 3.1.1
wasmer: 3.3.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: [14.0.3]
wasmer: [3.1.1]
wasmer: [3.3.0]
v8: [11.4.183.23]
ssl: [no_ssl, ssl]
debug: [debug, no_debug]
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
ngx: [1.25.3]
runtime: [wasmtime, wasmer, v8]
wasmtime: [14.0.3]
wasmer: [3.1.1]
wasmer: [3.3.0]
v8: [11.4.183.23]
include:
- label: old_nginx
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
openresty: [""]
runtime: [wasmer]
wasmtime: [""]
wasmer: [3.1.1]
wasmer: [3.3.0]
v8: [""]
ssl: [ssl]
debug: [debug, no_debug]
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
cc: gcc-12
ngx: 1.21.6
runtime: wasmer
wasmer: 3.1.1
wasmer: 3.3.0
ssl: ssl
debug: debug
hup: no_hup
Expand All @@ -86,7 +86,7 @@ jobs:
cc: gcc-12
ngx: 1.25.3
runtime: wasmer
wasmer: 3.1.1
wasmer: 3.3.0
ssl: no_ssl
debug: no_debug
hup: no_hup
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
matrix:
label: ["full"]
runtime: [wasmer]
wasmer: [3.1.1]
wasmer: [3.3.0]
os: [ubuntu-22.04]
cc: [gcc-12]
ngx: [1.25.3]
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
# OpenResty
- label: openresty
runtime: wasmer
wasmer: 3.1.1
wasmer: 3.3.0
os: ubuntu-22.04
cc: gcc-12
openresty: 1.21.4.2
Expand Down Expand Up @@ -252,7 +252,7 @@ jobs:
openresty: [1.21.4.2]
runtime: [wasmtime, wasmer, v8]
wasmtime: [14.0.3]
wasmer: [3.1.1]
wasmer: [3.3.0]
v8: [11.4.183.23]
ssl: [ssl]
debug: [debug, no_debug]
Expand All @@ -262,7 +262,7 @@ jobs:
cc: clang-15
ngx: 1.25.3
runtime: wasmer
wasmer: 3.1.1
wasmer: 3.3.0
ssl: no_ssl
debug: debug
uses: ./.github/workflows/job-clang-analyzer.yml
Expand All @@ -288,7 +288,7 @@ jobs:
ngx: [1.25.3]
runtime: [wasmtime, wasmer, v8]
wasmtime: [14.0.3]
wasmer: [3.1.1]
wasmer: [3.3.0]
v8: [11.4.183.23]
uses: ./.github/workflows/job-build-tests.yml
with:
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.3
OPENSSL ?= 3.2.0
WASMTIME ?= 14.0.3
WASMER ?= 3.1.1
WASMER ?= 3.3.0
V8 ?= 11.4.183.23
PCRE ?= 8.45
ZLIB ?= 1.3
Expand Down
2 changes: 1 addition & 1 deletion src/wasm/wrt/ngx_wrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void ngx_wasmtime_valvec2wasm(wasm_val_vec_t *out, wasmtime_val_t *vec,

#if WASMER_VERSION_MAJOR != 3
# error Unsupported Wasmer version
#elif WASMER_VERSION_MINOR > 1
#elif WASMER_VERSION_MINOR > 3
# 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 @@ -610,6 +610,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 @@ -696,11 +704,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
32 changes: 1 addition & 31 deletions valgrind.suppress
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,7 @@
fun:ngx_http_headers_more_filter
}
{
<wasmer 3.1.1: parse>
Memcheck:Cond
fun:_ZN10wasmparser6parser6Parser5parse17h5c54f0ee5315402aE
...
fun:main
}
{
<wasmer 3.1.1: wasm_instance_new>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
...
fun:_ZN6wasmer3sys8instance8Instance12new_by_index17h9b11b6b5fcb57319E
fun:wasm_instance_new
}
{
<wasmer 3.1.1: wasm_module_new>
Memcheck:Leak
match-leak-kinds: possible
fun:calloc
...
fun:_ZN6wasmer3sys6module6Module11from_binary17h0e63bedfc82f5d11E
fun:wasm_module_new
}
{
<wasmtime 14.0.3: parse>
<wasmparser::parse>
Memcheck:Cond
fun:_ZN10wasmparser6parser6Parser5parse17h*
}
Expand All @@ -68,8 +43,3 @@
fun:_ZN4wasm6Engine4makeEOSt10unique_ptrINS_6ConfigESt14default_deleteIS2_EE
fun:wasm_engine_new
}
{
<ngx_wasm_rs: parse>
Memcheck:Cond
fun:_ZN10wasmparser6parser6Parser5parse17h9b8c5cdeb2164838E
}