diff --git a/lib/environ/src/module.rs b/lib/environ/src/module.rs index 11e68ef3da..0a51fba9ba 100644 --- a/lib/environ/src/module.rs +++ b/lib/environ/src/module.rs @@ -8,6 +8,7 @@ use cranelift_wasm::{ GlobalIndex, Memory, MemoryIndex, SignatureIndex, Table, TableIndex, }; use indexmap::IndexMap; +use std::boxed::Box; use std::string::String; use std::vec::Vec; @@ -21,7 +22,7 @@ pub struct TableElements { /// The offset to add to the base. pub offset: usize, /// The values to write into the table elements. - pub elements: Vec, + pub elements: Box<[FuncIndex]>, } /// An entity to export. diff --git a/lib/environ/src/module_environ.rs b/lib/environ/src/module_environ.rs index 517f565b07..e9d4776a25 100644 --- a/lib/environ/src/module_environ.rs +++ b/lib/environ/src/module_environ.rs @@ -153,7 +153,7 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data table_index, base, offset, - elements: elements.to_vec(), + elements, }); } diff --git a/lib/jit/Cargo.toml b/lib/jit/Cargo.toml index 053c238775..45df39dd30 100644 --- a/lib/jit/Cargo.toml +++ b/lib/jit/Cargo.toml @@ -18,7 +18,7 @@ cranelift-wasm = "0.28.0" cranelift-frontend = "0.28.0" wasmtime-environ = { path = "../environ", default-features = false } wasmtime-runtime = { path = "../runtime", default-features = false } -region = "1.0.0" +region = "2.0.0" failure = { version = "0.1.3", default-features = false } failure_derive = { version = "0.1.3", default-features = false } target-lexicon = { version = "0.2.0", default-features = false } diff --git a/lib/runtime/Cargo.toml b/lib/runtime/Cargo.toml index e7820501d6..9b42668bf6 100644 --- a/lib/runtime/Cargo.toml +++ b/lib/runtime/Cargo.toml @@ -16,7 +16,7 @@ cranelift-codegen = "0.28.0" cranelift-entity = "0.28.0" cranelift-wasm = "0.28.0" wasmtime-environ = { path = "../environ", default-features = false } -region = "1.0.0" +region = "2.0.0" lazy_static = "1.2.0" libc = { version = "0.2.44", default-features = false } errno = "0.2.4" @@ -31,7 +31,7 @@ winapi = { version = "0.3.6", features = ["winbase", "memoryapi"] } [build-dependencies] cmake = "0.1.35" -bindgen = "0.46.0" +bindgen = "0.47.1" regex = "1.0.6" [features] diff --git a/lib/runtime/src/memory.rs b/lib/runtime/src/memory.rs index 09bd3a6468..6382d00ff6 100644 --- a/lib/runtime/src/memory.rs +++ b/lib/runtime/src/memory.rs @@ -117,7 +117,7 @@ impl LinearMemory { new_mmap.as_mut_slice()[..copy_len].copy_from_slice(&self.mmap.as_slice()[..copy_len]); self.mmap = new_mmap; - } else { + } else if delta_bytes > 0 { // Make the newly allocated pages accessible. self.mmap.make_accessible(prev_bytes, delta_bytes).ok()?; }