PVF: NaN canonicalization & deteriministic stack (#9069)

* NaN canonicalization

* Introduce a simple stack depth metering

* Be explicit about the wasm features we enable

* Pull the latest latast fix for the pwasm-utils crate

* Disable `wasm_threads` as well.

* Factor out deterministic stack params

* Add more docs

* Remove redundant dep

* Refine comments

* Typo

Co-authored-by: Andronik Ordian <write@reusable.software>

Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
Sergei Shulepov
2021-07-07 11:29:39 +03:00
committed by GitHub
parent d80e1bc978
commit f388b66ab5
9 changed files with 2610 additions and 66 deletions
+6 -39
View File
@@ -6397,9 +6397,9 @@ dependencies = [
[[package]]
name = "pwasm-utils"
version = "0.18.0"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0e517f47d9964362883182404b68d0b6949382c0baa40aa5ffca94f5f1e3481"
checksum = "f0c1a2f10b47d446372a4f397c58b329aaea72b2daf9395a623a411cb8ccb54f"
dependencies = [
"byteorder",
"log",
@@ -7536,13 +7536,17 @@ dependencies = [
"log",
"parity-scale-codec",
"parity-wasm 0.42.2",
"pwasm-utils",
"sc-allocator",
"sc-executor-common",
"sc-runtime-test",
"scoped-tls",
"sp-core",
"sp-io",
"sp-runtime-interface",
"sp-wasm-interface",
"wasmtime",
"wat",
]
[[package]]
@@ -8270,26 +8274,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "scroll"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
dependencies = [
"scroll_derive",
]
[[package]]
name = "scroll_derive"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "sct"
version = "0.6.0"
@@ -11070,11 +11054,9 @@ dependencies = [
"wasmparser",
"wasmtime-cache",
"wasmtime-environ",
"wasmtime-fiber",
"wasmtime-jit",
"wasmtime-profiling",
"wasmtime-runtime",
"wat",
"winapi 0.3.9",
]
@@ -11149,17 +11131,6 @@ dependencies = [
"wasmparser",
]
[[package]]
name = "wasmtime-fiber"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a089d44cd7e2465d41a53b840a5b4fca1bf6d1ecfebc970eac9592b34ea5f0b3"
dependencies = [
"cc",
"libc",
"winapi 0.3.9",
]
[[package]]
name = "wasmtime-jit"
version = "0.27.0"
@@ -11215,11 +11186,8 @@ checksum = "e24364d522dcd67c897c8fffc42e5bdfc57207bbb6d7eeade0da9d4a7d70105b"
dependencies = [
"anyhow",
"cfg-if 1.0.0",
"gimli 0.24.0",
"lazy_static",
"libc",
"object 0.24.0",
"scroll",
"serde",
"target-lexicon",
"wasmtime-environ",
@@ -11247,7 +11215,6 @@ dependencies = [
"region",
"thiserror",
"wasmtime-environ",
"wasmtime-fiber",
"winapi 0.3.9",
]