From 06407e327ffb0b7a85a5ac186107e00f2ce287c9 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:23:48 -0700 Subject: [PATCH 1/9] Remove goblin, use object. --- lib/compiler-llvm/Cargo.toml | 2 +- lib/compiler-llvm/src/object_file.rs | 216 +++++++++++------------ lib/compiler-llvm/src/trampoline/wasm.rs | 4 +- lib/compiler-llvm/src/translator/code.rs | 2 +- 4 files changed, 109 insertions(+), 115 deletions(-) diff --git a/lib/compiler-llvm/Cargo.toml b/lib/compiler-llvm/Cargo.toml index c615e76ef84..1c211f5aa0c 100644 --- a/lib/compiler-llvm/Cargo.toml +++ b/lib/compiler-llvm/Cargo.toml @@ -17,7 +17,7 @@ wasmer-vm = { path = "../vm", version = "1.0.2" } wasmer-types = { path = "../types", version = "1.0.2" } target-lexicon = { version = "0.11", default-features = false } smallvec = "1.6" -goblin = "0.3" +object = { version = "0.24", default-features = false, features = ["read"] } libc = { version = "^0.2", default-features = false } byteorder = "1" itertools = "0.10" diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index aaed70fa028..97fcc74d76a 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -1,5 +1,8 @@ +use object::{Object, ObjectSection, ObjectSymbol}; + use std::collections::{HashMap, HashSet}; -use std::convert::TryFrom; +use std::convert::TryInto; +use std::num::TryFromIntError; use wasmer_compiler::{ CompileError, CompiledFunctionFrameInfo, CustomSection, CustomSectionProtection, @@ -9,13 +12,14 @@ use wasmer_compiler::{ use wasmer_types::entity::{PrimaryMap, SecondaryMap}; use wasmer_vm::libcalls::LibCall; +/* use wasmer_types::entity::entity_impl; #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Debug)] pub struct ElfSectionIndex(u32); entity_impl!(ElfSectionIndex); impl ElfSectionIndex { pub fn is_undef(&self) -> bool { - self.as_u32() == goblin::elf::section_header::SHN_UNDEF + self.as_u32() == object::elf::SHN_UNDEF } pub fn from_usize(value: usize) -> Result { @@ -32,9 +36,14 @@ impl ElfSectionIndex { self.as_u32() as usize } } + */ + +fn map_tryfromint_err(error: TryFromIntError) -> CompileError { + CompileError::Codegen(format!("int doesn't fit: {}", error)) +} -fn map_goblin_err(error: goblin::error::Error) -> CompileError { - CompileError::Codegen(format!("error parsing ELF file: {}", error)) +fn map_object_err(error: object::read::Error) -> CompileError { + CompileError::Codegen(format!("error parsing object file: {}", error)) } pub struct CompiledFunction { @@ -50,7 +59,7 @@ pub fn load_object_file( mut symbol_name_to_relocation_target: F, ) -> Result where - F: FnMut(&String) -> Result, CompileError>, + F: FnMut(&str) -> Result, CompileError>, { // TODO: use perfect hash function? let mut libcalls = HashMap::new(); @@ -115,52 +124,23 @@ where libcalls.insert("wasmer_vm_raise_trap".to_string(), LibCall::RaiseTrap); libcalls.insert("wasmer_vm_probestack".to_string(), LibCall::Probestack); - let elf = goblin::elf::Elf::parse(&contents).map_err(map_goblin_err)?; - let get_section_name = |section: &goblin::elf::section_header::SectionHeader| { - if section.sh_name == goblin::elf::section_header::SHN_UNDEF as _ { - return None; - } - elf.strtab.get(section.sh_name)?.ok() - }; + let elf = object::File::parse(contents).map_err(map_object_err)?; - // Build up a mapping from a section to its relocation sections. - let reloc_sections = elf.shdr_relocs.iter().fold( - HashMap::new(), - |mut map: HashMap<_, Vec<_>>, (section_index, reloc_section)| { - let target_section = elf.section_headers[*section_index].sh_info as usize; - let target_section = ElfSectionIndex::from_usize(target_section).unwrap(); - map.entry(target_section).or_default().push(reloc_section); - map - }, - ); - - let mut visited: HashSet = HashSet::new(); - let mut worklist: Vec = Vec::new(); - let mut section_targets: HashMap = HashMap::new(); + let mut visited: HashSet = HashSet::new(); + let mut worklist: Vec = Vec::new(); + let mut section_targets: HashMap = HashMap::new(); let root_section_index = elf - .section_headers - .iter() - .enumerate() - .filter(|(_, section)| get_section_name(section) == Some(root_section)) - .map(|(index, _)| index) - .collect::>(); - if root_section_index.len() != 1 { - return Err(CompileError::Codegen(format!( - "found {} sections named {}", - root_section_index.len(), - root_section - ))); - } - let root_section_index = root_section_index[0]; - let root_section_index = ElfSectionIndex::from_usize(root_section_index)?; + .section_by_name(root_section) + .ok_or_else(|| CompileError::Codegen(format!("no section named {}", root_section)))? + .index(); let mut section_to_custom_section = HashMap::new(); section_targets.insert(root_section_index, root_section_reloc_target); let mut next_custom_section: u32 = 0; - let mut elf_section_to_target = |elf_section_index: ElfSectionIndex| { + let mut elf_section_to_target = |elf_section_index: object::read::SectionIndex| { *section_targets.entry(elf_section_index).or_insert_with(|| { let next = SectionIndex::from_u32(next_custom_section); section_to_custom_section.insert(elf_section_index, next); @@ -170,15 +150,9 @@ where }) }; - let section_bytes = |elf_section_index: ElfSectionIndex| { - let elf_section_index = elf_section_index.as_usize(); - let byte_range = elf.section_headers[elf_section_index].file_range(); - contents[byte_range.start..byte_range.end].to_vec() - }; - // From elf section index to list of Relocations. Although we use a Vec, // the order of relocations is not important. - let mut relocations: HashMap> = HashMap::new(); + let mut relocations: HashMap> = HashMap::new(); // Each iteration of this loop pulls a section and the relocations // relocations that apply to it. We begin with the ".root_section" @@ -198,11 +172,9 @@ where // Also add any .eh_frame sections. let mut eh_frame_section_indices = vec![]; - // TODO: this constant has been added to goblin, now waiting for release - const SHT_X86_64_UNWIND: u32 = 0x7000_0001; - for (index, shdr) in elf.section_headers.iter().enumerate() { - if shdr.sh_type == SHT_X86_64_UNWIND { - let index = ElfSectionIndex::from_usize(index)?; + for section in elf.sections() { + if section.kind() == object::SectionKind::Elf(object::elf::SHT_X86_64_UNWIND) { + let index = section.index(); worklist.push(index); visited.insert(index); eh_frame_section_indices.push(index); @@ -212,75 +184,86 @@ where } while let Some(section_index) = worklist.pop() { - for reloc in reloc_sections - .get(§ion_index) - .iter() - .flat_map(|inner| inner.iter().flat_map(|inner2| inner2.iter())) + for (offset, reloc) in elf + .section_by_index(section_index) + .map_err(map_object_err)? + .relocations() { - let kind = match reloc.r_type { - // TODO: these constants are not per-arch, we'll need to - // make the whole match per-arch. - goblin::elf::reloc::R_X86_64_64 => RelocationKind::Abs8, - goblin::elf::reloc::R_X86_64_PC64 => RelocationKind::X86PCRel8, - goblin::elf::reloc::R_X86_64_GOT64 => { - return Err(CompileError::Codegen( - "unimplemented PIC relocation R_X86_64_GOT64".into(), - )); - } - goblin::elf::reloc::R_X86_64_GOTPC64 => { - return Err(CompileError::Codegen( - "unimplemented PIC relocation R_X86_64_GOTPC64".into(), - )); - } + let kind = match (reloc.kind(), reloc.size()) { + (object::RelocationKind::Absolute, 64) => RelocationKind::Abs8, + (object::RelocationKind::Elf(24), 0) => RelocationKind::X86PCRel8, _ => { return Err(CompileError::Codegen(format!( - "unknown ELF relocation {}", - reloc.r_type + "unknown relocation {:?}", + reloc ))); } }; - let offset = reloc.r_offset as u32; - let addend = reloc.r_addend.unwrap_or(0); - let target = reloc.r_sym; - let elf_target = elf.syms.get(target).ok_or_else(|| { - CompileError::Codegen(format!( - "relocation refers to symbol {} past end of symbol table (len={})", - target, - elf.syms.len() - )) - })?; - let elf_target_section = ElfSectionIndex::from_usize(elf_target.st_shndx)?; - let reloc_target = if elf_target_section == root_section_index { - root_section_reloc_target - } else if elf_target.st_type() == goblin::elf::sym::STT_SECTION { - if visited.insert(elf_target_section) { - worklist.push(elf_target_section); + let addend = reloc.addend(); + let target = match reloc.target() { + object::read::RelocationTarget::Symbol(index) => { + let symbol = elf.symbol_by_index(index).map_err(map_object_err)?; + let symbol_name = symbol.name().map_err(map_object_err)?; + if symbol.kind() == object::SymbolKind::Section { + match symbol.section() { + object::SymbolSection::Section(section_index) => { + if section_index == root_section_index { + root_section_reloc_target + } else { + if visited.insert(section_index) { + worklist.push(section_index); + } + elf_section_to_target(section_index) + } + } + _ => { + return Err(CompileError::Codegen(format!( + "relocation targets unknown section {:?}", + reloc + ))); + } + } + // Maybe a libcall then? + } else if let Some(libcall) = libcalls.get(symbol_name) { + RelocationTarget::LibCall(*libcall) + } else if let Some(reloc_target) = + symbol_name_to_relocation_target(symbol_name)? + { + reloc_target + } else { + return Err(CompileError::Codegen(format!( + "relocation targets unknown symbol {:?}", + reloc + ))); + } + } + object::read::RelocationTarget::Section(index) => { + if index == root_section_index { + root_section_reloc_target + } else { + if visited.insert(index) { + worklist.push(index); + } + elf_section_to_target(index) + } } - elf_section_to_target(elf_target_section) - } else if elf_target.st_type() == goblin::elf::sym::STT_NOTYPE - && elf_target_section.is_undef() - { - // Not defined in this .o file. Maybe another local function? - let name = elf_target.st_name; - let name = elf.strtab.get(name).unwrap().unwrap().into(); - if let Some(reloc_target) = symbol_name_to_relocation_target(&name)? { - reloc_target - // Maybe a libcall then? - } else if let Some(libcall) = libcalls.get(&name) { - RelocationTarget::LibCall(*libcall) - } else { - unimplemented!("reference to unknown symbol {}", name); + object::read::RelocationTarget::Absolute => { + // Wasm-produced object files should never have absolute + // addresses in them because none of the parts of the wasm + // VM, nor the generated code are loaded at fixed addresses. + return Err(CompileError::Codegen(format!( + "relocation targets absolute address {:?}", + reloc + ))); } - } else { - unimplemented!("unknown relocation {:?} with target {:?}", reloc, target); }; relocations .entry(section_index) .or_default() .push(Relocation { kind, - reloc_target, - offset, + reloc_target: target, + offset: offset.try_into().map_err(map_tryfromint_err)?, addend, }); } @@ -308,7 +291,13 @@ where custom_section_index, CustomSection { protection: CustomSectionProtection::Read, - bytes: SectionBody::new_with_vec(section_bytes(*elf_section_index)), + bytes: SectionBody::new_with_vec( + elf.section_by_index(*elf_section_index) + .unwrap() + .data() + .unwrap() + .to_vec(), + ), relocations: relocations .remove_entry(elf_section_index) .map_or(vec![], |(_, v)| v), @@ -323,7 +312,12 @@ where .collect::>(); let function_body = FunctionBody { - body: section_bytes(root_section_index), + body: elf + .section_by_index(root_section_index) + .unwrap() + .data() + .unwrap() + .to_vec(), unwind_info: None, }; diff --git a/lib/compiler-llvm/src/trampoline/wasm.rs b/lib/compiler-llvm/src/trampoline/wasm.rs index d2d92110109..20f8d5c975e 100644 --- a/lib/compiler-llvm/src/trampoline/wasm.rs +++ b/lib/compiler-llvm/src/trampoline/wasm.rs @@ -124,7 +124,7 @@ impl FuncTrampoline { mem_buf_slice, FUNCTION_SECTION, RelocationTarget::LocalFunc(LocalFunctionIndex::from_u32(0)), - |name: &String| { + |name: &str| { Err(CompileError::Codegen(format!( "trampoline generation produced reference to unknown function {}", name @@ -248,7 +248,7 @@ impl FuncTrampoline { mem_buf_slice, FUNCTION_SECTION, RelocationTarget::LocalFunc(LocalFunctionIndex::from_u32(0)), - |name: &String| { + |name: &str| { Err(CompileError::Codegen(format!( "trampoline generation produced reference to unknown function {}", name diff --git a/lib/compiler-llvm/src/translator/code.rs b/lib/compiler-llvm/src/translator/code.rs index daa040284fa..742ec81a8f4 100644 --- a/lib/compiler-llvm/src/translator/code.rs +++ b/lib/compiler-llvm/src/translator/code.rs @@ -302,7 +302,7 @@ impl FuncTranslator { mem_buf_slice, FUNCTION_SECTION, RelocationTarget::LocalFunc(*local_func_index), - |name: &String| { + |name: &str| { Ok( if let Some(Symbol::LocalFunction(local_func_index)) = symbol_registry.name_to_symbol(name) From bab4e53c586863839b98d3fbb4c431da93c5fb17 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:25:27 -0700 Subject: [PATCH 2/9] Remove commented-out implementation of ElfSectionIndex. --- lib/compiler-llvm/src/object_file.rs | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 97fcc74d76a..11b86166a48 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -12,32 +12,6 @@ use wasmer_compiler::{ use wasmer_types::entity::{PrimaryMap, SecondaryMap}; use wasmer_vm::libcalls::LibCall; -/* -use wasmer_types::entity::entity_impl; -#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Debug)] -pub struct ElfSectionIndex(u32); -entity_impl!(ElfSectionIndex); -impl ElfSectionIndex { - pub fn is_undef(&self) -> bool { - self.as_u32() == object::elf::SHN_UNDEF - } - - pub fn from_usize(value: usize) -> Result { - match u32::try_from(value) { - Err(_) => Err(CompileError::Codegen(format!( - "elf section index {} does not fit in 32 bits", - value - ))), - Ok(value) => Ok(ElfSectionIndex::from_u32(value)), - } - } - - pub fn as_usize(&self) -> usize { - self.as_u32() as usize - } -} - */ - fn map_tryfromint_err(error: TryFromIntError) -> CompileError { CompileError::Codegen(format!("int doesn't fit: {}", error)) } From fd22404a5e8b957e6901d8571f1c27bae38b17a9 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:32:52 -0700 Subject: [PATCH 3/9] Update cargo.locks. Update fuzz/Cargo.toml. For wasm-smith the 'master' git branch was renamed to 'main. Switch to a versioned release since it contains the fixes we need. --- Cargo.lock | 306 ++++++++++++++++++++---------------------------- fuzz/Cargo.lock | 192 ++++++++++++++---------------- fuzz/Cargo.toml | 2 +- 3 files changed, 214 insertions(+), 286 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 08cc29ee23a..bb3874c0ffd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] @@ -47,9 +47,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" +checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" [[package]] name = "arrayref" @@ -96,25 +96,25 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.56" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" +checksum = "88fb5a785d6b44fd9d6700935608639af1b8356de1e55d5f7c2740f4faa15d82" dependencies = [ "addr2line", + "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.23.0", "rustc-demangle", ] [[package]] name = "bincode" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d175dfa69e619905c4c3cdb7c3c203fa3bdd5d51184e3afdb2742c0280493772" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "byteorder", "serde", ] @@ -164,9 +164,9 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" +checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" dependencies = [ "lazy_static", "memchr", @@ -191,9 +191,9 @@ checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytesize" @@ -203,9 +203,9 @@ checksum = "81a18687293a1546b67c246452202bbbf143d239cb43494cc163da14979082da" [[package]] name = "cast" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" +checksum = "cc38c385bfd7e444464011bb24820f40dd1c76bcdfa1b78611cb7c2e5cafab75" dependencies = [ "rustc_version 0.2.3", ] @@ -258,9 +258,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54d78e30b388d4815220c8dd03fea5656b6c6d32adb59e89061552a102f8da1" +checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c" dependencies = [ "glob", "libc", @@ -488,9 +488,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -509,9 +509,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" +checksum = "52fb27eab85b17fbb9f6fd667089e07d6a2eb8743d02639ee7f6a7a7729c9c94" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -522,9 +522,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" +checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -565,9 +565,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19" +checksum = "5e98e2ad1a782e33928b96fc3948e7c355e5af34ba4de7670fe8bac2a3b2006d" dependencies = [ "quote", "syn", @@ -575,9 +575,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06d4a9551359071d1890820e3571252b91229e0712e7c36b08940e603c5a8fc" +checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" dependencies = [ "darling_core", "darling_macro", @@ -585,9 +585,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b443e5fb0ddd56e0c9bfa47dc060c5306ee500cb731f2b91432dd65589a77684" +checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" dependencies = [ "fnv", "ident_case", @@ -599,9 +599,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0220073ce504f12a70efc4e7cdaea9e9b1b324872e7ad96a208056d7a638b81" +checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" dependencies = [ "darling_core", "quote", @@ -885,17 +885,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -[[package]] -name = "goblin" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "669cdc3826f69a51d3f8fc3f86de81c2378110254f678b8407977736122057a4" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "half" version = "1.7.1" @@ -1069,9 +1058,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "js-sys" -version = "0.3.48" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" +checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" dependencies = [ "wasm-bindgen", ] @@ -1096,9 +1085,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.88" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b07a082330a35e43f63177cc01689da34fbffa0105e1246cf0311472cac73a" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" [[package]] name = "libffi" @@ -1146,9 +1135,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" dependencies = [ "scopeguard", ] @@ -1175,9 +1164,9 @@ dependencies = [ [[package]] name = "loupe-derive" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40881c741681f26b0f4c0261f493c8df600998807184b524e34b7e208324834" +checksum = "0a545b22ceeec36de91c46206afd384c17946bd62b95b76e927a2adb77fbdcc0" dependencies = [ "quote", "syn", @@ -1206,33 +1195,33 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" [[package]] name = "memmap2" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e3e85b970d650e2ae6d70592474087051c11c54da7f7b4949725c5735fbcc6" +checksum = "397d1a6d6d0563c0f5462bbdae662cf6c784edf5e828e40c7257f85d82bf56dd" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" dependencies = [ "autocfg", ] [[package]] name = "minifb" -version = "0.19.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87b4b6a6da61c3003a41e84ee1f6b56e079f835f4d4fce424fc84092b57ad804" +checksum = "7b6e41119d1667465608d36488fa5dcd228057a26c156e25f17f492f38435124" dependencies = [ "cc", "orbclient", @@ -1259,11 +1248,10 @@ dependencies = [ [[package]] name = "miow" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "socket2", "winapi", ] @@ -1275,15 +1263,14 @@ checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] name = "nix" -version = "0.17.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" +checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" dependencies = [ "bitflags", "cc", - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", - "void", ] [[package]] @@ -1341,6 +1328,12 @@ dependencies = [ "indexmap", ] +[[package]] +name = "object" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" + [[package]] name = "once_cell" version = "1.7.2" @@ -1432,12 +1425,6 @@ version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "plotters" version = "0.3.0" @@ -1474,9 +1461,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "predicates" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb433456c1a57cc93554dea3ce40b4c19c4057e41c55d4a0f3d84ea71c325aa" +checksum = "f49cfaf7fdaa3bfacc6fa3e7054e65148878354a5cfddcf661df4c851f8021df" dependencies = [ "difference", "float-cmp", @@ -1527,9 +1514,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ "unicode-xid", ] @@ -1639,9 +1626,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +checksum = "85dd92e586f7355c633911e11f77f3d12f04b1b1bd76a198bd34ae3af8341ef2" dependencies = [ "bitflags", ] @@ -1676,9 +1663,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.5" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" +checksum = "ce5f1ceb7f74abbce32601642fcf8e8508a8a8991e0621c7d750295b9095702b" dependencies = [ "aho-corasick", "memchr", @@ -1696,9 +1683,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.23" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "region" @@ -1723,9 +1710,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533488e35e9756976c402485db01485a3d5f51b46dd85cca9211b57373581cfa" +checksum = "20ddfdfd8384df988eca0ae1763d42eb48c9ad027ec7c7145296aafffa864842" dependencies = [ "memoffset", "ptr_meta", @@ -1746,9 +1733,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce" [[package]] name = "rustc-hash" @@ -1813,31 +1800,11 @@ 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 = "sdl2" -version = "0.34.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbb85f4211627a7291c83434d6bbfa723e28dcaa53c7606087e3c61929e4b9c" +checksum = "deecbc3fa9460acff5a1e563e05cb5f31bba0aa0c214bb49a43db8159176d54b" dependencies = [ "bitflags", "lazy_static", @@ -1848,9 +1815,9 @@ dependencies = [ [[package]] name = "sdl2-sys" -version = "0.34.3" +version = "0.34.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d81feded049b9c14eceb4a4f6d596a98cebbd59abdba949c5552a015466d33" +checksum = "41a29aa21f175b5a41a6e26da572d5e5d1ee5660d35f9f9d0913e8a802098f74" dependencies = [ "cfg-if 0.1.10", "cmake", @@ -1902,9 +1869,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.124" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd761ff957cb2a45fbb9ab3da6512de9de55872866160b23c25f1a841e99d29f" +checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" dependencies = [ "serde_derive", ] @@ -1930,9 +1897,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.124" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1800f7693e94e186f5e25a28291ae1570da908aff7d97a095dec1e56ff99069b" +checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" dependencies = [ "proc-macro2", "quote", @@ -1962,17 +1929,6 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi", -] - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -1999,9 +1955,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.64" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" +checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373" dependencies = [ "proc-macro2", "quote", @@ -2149,9 +2105,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if 1.0.0", "log", @@ -2173,9 +2129,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" dependencies = [ "lazy_static", ] @@ -2236,9 +2192,9 @@ checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "unidiff" @@ -2265,15 +2221,9 @@ checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" [[package]] name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "void" -version = "1.0.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "wait-timeout" @@ -2286,9 +2236,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", "winapi", @@ -2303,9 +2253,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.71" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" +checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -2313,9 +2263,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.71" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" +checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" dependencies = [ "bumpalo", "lazy_static", @@ -2328,9 +2278,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.71" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" +checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2338,9 +2288,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.71" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" +checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" dependencies = [ "proc-macro2", "quote", @@ -2351,9 +2301,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.71" +version = "0.2.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" +checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" [[package]] name = "wasmer" @@ -2506,12 +2456,12 @@ version = "1.0.2" dependencies = [ "byteorder", "cc", - "goblin", "inkwell", "itertools 0.10.0", "lazy_static", "libc", "loupe", + "object 0.24.0", "rayon", "regex", "rustc_version 0.2.3", @@ -2634,7 +2584,7 @@ dependencies = [ "wasmer-object", "wasmer-types", "wasmer-vm", - "which 4.0.2", + "which 4.1.0", ] [[package]] @@ -2678,7 +2628,7 @@ dependencies = [ name = "wasmer-object" version = "1.0.2" dependencies = [ - "object", + "object 0.23.0", "thiserror", "wasmer-compiler", "wasmer-types", @@ -2809,27 +2759,27 @@ dependencies = [ [[package]] name = "wast" -version = "35.0.0" +version = "35.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5ae96da18bb5926341516fd409b5a8ce4e4714da7f0a1063d3b20ac9f9a1e1" +checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0fa059022c5dabe129f02b429d67086400deb8277f89c975555dacc1dadbcc" +checksum = "8ec280a739b69173e0ffd12c1658507996836ba4e992ed9bc1e5385a0bd72a02" dependencies = [ - "wast 35.0.0", + "wast 35.0.2", ] [[package]] name = "wayland-client" -version = "0.27.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab702fefbcd6d6f67fb5816e3a89a3b5a42a94290abbc015311c9a30d1068ae4" +checksum = "06ca44d86554b85cf449f1557edc6cc7da935cc748c8e4bf1c507cbd43bae02c" dependencies = [ "bitflags", "downcast-rs", @@ -2842,9 +2792,9 @@ dependencies = [ [[package]] name = "wayland-commons" -version = "0.27.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e972e9336ad5a9dd861b4e21ff35ad71d3e5c6b4803d65c39913612f851b95f1" +checksum = "8bd75ae380325dbcff2707f0cd9869827ea1d2d6d534cff076858d3f0460fd5a" dependencies = [ "nix", "once_cell", @@ -2854,9 +2804,9 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.27.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539f346e1a3f706f38c8ccbe1196001e2fb1c9b3e6b605c27d665db2f5b60d41" +checksum = "b37e5455ec72f5de555ec39b5c3704036ac07c2ecd50d0bffe02d5fe2d4e65ab" dependencies = [ "nix", "wayland-client", @@ -2865,9 +2815,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.27.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d6fc54b17b98b5083bc21ae3a30e6d75cb4b01647360e4c3a04648bcf8781d" +checksum = "95df3317872bcf9eec096c864b69aa4769a1d5d6291a5b513f8ba0af0efbd52c" dependencies = [ "bitflags", "wayland-client", @@ -2877,9 +2827,9 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.27.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030f56009d932bd9400bb472764fea8109be1b0fc482d9cd75496c943ac30328" +checksum = "389d680d7bd67512dc9c37f39560224327038deb0f0e8d33f870900441b68720" dependencies = [ "proc-macro2", "quote", @@ -2888,18 +2838,18 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.27.0" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bdeffbbb474477dfa2acb45ac7479e5fe8f741c64ab032c5d11b94d07edc269" +checksum = "2907bd297eef464a95ba9349ea771611771aa285b932526c633dc94d5400a8e2" dependencies = [ "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.48" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" +checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be" dependencies = [ "js-sys", "wasm-bindgen", @@ -2916,12 +2866,12 @@ dependencies = [ [[package]] name = "which" -version = "4.0.2" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c14ef7e1b8b8ecfc75d5eca37949410046e66f15d185c01d70824f1f8111ef" +checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe" dependencies = [ + "either", "libc", - "thiserror", ] [[package]] diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 1bfd5c36cc2..bf6954df02d 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -19,18 +19,18 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cddc5f91628367664cc7c69714ff08deee8a3efc54623011c772544d7b2767" +checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" [[package]] name = "arbitrary" @@ -49,15 +49,16 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.56" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" +checksum = "88fb5a785d6b44fd9d6700935608639af1b8356de1e55d5f7c2740f4faa15d82" dependencies = [ "addr2line", + "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.23.0", "rustc-demangle", ] @@ -69,9 +70,9 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" @@ -167,9 +168,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -188,9 +189,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" +checksum = "52fb27eab85b17fbb9f6fd667089e07d6a2eb8743d02639ee7f6a7a7729c9c94" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -201,9 +202,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" +checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -212,9 +213,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06d4a9551359071d1890820e3571252b91229e0712e7c36b08940e603c5a8fc" +checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" dependencies = [ "darling_core", "darling_macro", @@ -222,9 +223,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b443e5fb0ddd56e0c9bfa47dc060c5306ee500cb731f2b91432dd65589a77684" +checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" dependencies = [ "fnv", "ident_case", @@ -236,9 +237,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0220073ce504f12a70efc4e7cdaea9e9b1b324872e7ad96a208056d7a638b81" +checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" dependencies = [ "darling_core", "quote", @@ -343,17 +344,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "goblin" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "669cdc3826f69a51d3f8fc3f86de81c2378110254f678b8407977736122057a4" -dependencies = [ - "log", - "plain", - "scroll", -] - [[package]] name = "hashbrown" version = "0.9.1" @@ -444,9 +434,9 @@ checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] name = "libc" -version = "0.2.91" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" [[package]] name = "libfuzzer-sys" @@ -483,9 +473,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" dependencies = [ "scopeguard", ] @@ -512,9 +502,9 @@ dependencies = [ [[package]] name = "loupe-derive" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e40881c741681f26b0f4c0261f493c8df600998807184b524e34b7e208324834" +checksum = "0a545b22ceeec36de91c46206afd384c17946bd62b95b76e927a2adb77fbdcc0" dependencies = [ "quote", "syn", @@ -531,24 +521,24 @@ dependencies = [ [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" [[package]] name = "memmap2" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e3e85b970d650e2ae6d70592474087051c11c54da7f7b4949725c5735fbcc6" +checksum = "397d1a6d6d0563c0f5462bbdae662cf6c784edf5e828e40c7257f85d82bf56dd" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" +checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" dependencies = [ "autocfg", ] @@ -589,6 +579,12 @@ dependencies = [ "indexmap", ] +[[package]] +name = "object" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" + [[package]] name = "once_cell" version = "1.7.2" @@ -635,12 +631,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - [[package]] name = "ppv-lite86" version = "0.2.10" @@ -673,9 +663,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ "unicode-xid", ] @@ -776,9 +766,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +checksum = "85dd92e586f7355c633911e11f77f3d12f04b1b1bd76a198bd34ae3af8341ef2" dependencies = [ "bitflags", ] @@ -796,9 +786,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.5" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" +checksum = "ce5f1ceb7f74abbce32601642fcf8e8508a8a8991e0621c7d750295b9095702b" dependencies = [ "aho-corasick", "memchr", @@ -807,9 +797,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.23" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "region" @@ -834,9 +824,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533488e35e9756976c402485db01485a3d5f51b46dd85cca9211b57373581cfa" +checksum = "20ddfdfd8384df988eca0ae1763d42eb48c9ad027ec7c7145296aafffa864842" dependencies = [ "memoffset", "ptr_meta", @@ -857,9 +847,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce" [[package]] name = "rustc-hash" @@ -888,26 +878,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 = "seahash" version = "4.1.0" @@ -996,9 +966,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.64" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" +checksum = "ad184cc9470f9117b2ac6817bfe297307418819ba40552f9b3846f05c33d5373" dependencies = [ "proc-macro2", "quote", @@ -1047,9 +1017,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ "cfg-if 1.0.0", "pin-project-lite", @@ -1070,9 +1040,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" dependencies = [ "lazy_static", ] @@ -1085,9 +1055,9 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "version_check" @@ -1103,16 +1073,18 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-encoder" -version = "0.4.0" -source = "git+https://github.com/bytecodealliance/wasm-tools#4e86f2a84fc54264388040b200eb32a165ec6453" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b4949d4f2b25a4b208317dcf86aacef9e7a5884e48dfc45d4aeb91808d6f86" dependencies = [ "leb128", ] [[package]] name = "wasm-smith" -version = "0.4.0" -source = "git+https://github.com/bytecodealliance/wasm-tools#4e86f2a84fc54264388040b200eb32a165ec6453" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a982408719f704307ac7f45247350f06ce739d759362ef8293ed7b4d922adee8" dependencies = [ "arbitrary", "indexmap", @@ -1173,7 +1145,7 @@ dependencies = [ "thiserror", "wasmer-types", "wasmer-vm", - "wasmparser", + "wasmparser 0.77.0", ] [[package]] @@ -1201,12 +1173,12 @@ version = "1.0.2" dependencies = [ "byteorder", "cc", - "goblin", "inkwell", "itertools", "lazy_static", "libc", "loupe", + "object 0.24.0", "rayon", "regex", "rustc_version", @@ -1315,7 +1287,7 @@ dependencies = [ name = "wasmer-object" version = "1.0.2" dependencies = [ - "object", + "object 0.23.0", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1358,42 +1330,48 @@ version = "0.77.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b35c86d22e720a07d954ebbed772d01180501afe7d03d464f413bb5f8914a8d6" +[[package]] +name = "wasmparser" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c7a8b20306d43c09c2c34e0ef68bf2959a11b01a5cae35e4c5dc1e7145547b6" + [[package]] name = "wasmprinter" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a64a1ecb60865b59789953ee6f62e49c3d47dde66b5b3f521c99b49d921836" +checksum = "2ccec894c70710c2e4669320a532cb2b9cfb97adb0429745642f8ce76916ed85" dependencies = [ "anyhow", - "wasmparser", + "wasmparser 0.78.0", ] [[package]] name = "wast" -version = "35.0.0" +version = "35.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5ae96da18bb5926341516fd409b5a8ce4e4714da7f0a1063d3b20ac9f9a1e1" +checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" dependencies = [ "leb128", ] [[package]] name = "wat" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0fa059022c5dabe129f02b429d67086400deb8277f89c975555dacc1dadbcc" +checksum = "8ec280a739b69173e0ffd12c1658507996836ba4e992ed9bc1e5385a0bd72a02" dependencies = [ "wast", ] [[package]] name = "which" -version = "4.0.2" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c14ef7e1b8b8ecfc75d5eca37949410046e66f15d185c01d70824f1f8111ef" +checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe" dependencies = [ + "either", "libc", - "thiserror", ] [[package]] diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 17ebef099a3..84e3b618cdf 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,7 +10,7 @@ cargo-fuzz = true [dependencies] anyhow = "1" -wasm-smith = { git = "https://github.com/bytecodealliance/wasm-tools" } +wasm-smith = "0.4.4" libfuzzer-sys = "0.4.0" wasmer = { path = "../lib/api" } wasmer-compiler-cranelift = { path = "../lib/compiler-cranelift", optional = true } From 3339b76414a2c0f76bf001dc540289da03bed668 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:39:08 -0700 Subject: [PATCH 4/9] Use symbolic name instead of number for relocation. --- lib/compiler-llvm/src/object_file.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 11b86166a48..67eb9240b0d 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -165,7 +165,7 @@ where { let kind = match (reloc.kind(), reloc.size()) { (object::RelocationKind::Absolute, 64) => RelocationKind::Abs8, - (object::RelocationKind::Elf(24), 0) => RelocationKind::X86PCRel8, + (object::RelocationKind::Elf(object::elf::R_X86_64_PC64), 0) => RelocationKind::X86PCRel8, _ => { return Err(CompileError::Codegen(format!( "unknown relocation {:?}", From 36496c1686ffccf4110795d25947ef281c4d6d8c Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:40:55 -0700 Subject: [PATCH 5/9] Update to object 0.24. --- lib/object/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/object/Cargo.toml b/lib/object/Cargo.toml index bc7839ee4be..b90d8194417 100644 --- a/lib/object/Cargo.toml +++ b/lib/object/Cargo.toml @@ -16,5 +16,5 @@ wasmer-compiler = { path = "../compiler", version = "1.0.2", default-features = "std", "translator" ] } -object = { version = "0.23", default-features = false, features = ["write"] } +object = { version = "0.24", default-features = false, features = ["write"] } thiserror = "1.0" From 32a56fa6753f63106cbe9d41790246e89a810cc2 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:42:46 -0700 Subject: [PATCH 6/9] Update cargo.lock files. --- Cargo.lock | 10 +++++----- fuzz/Cargo.lock | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb3874c0ffd..9c756175533 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1323,16 +1323,16 @@ name = "object" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" -dependencies = [ - "crc32fast", - "indexmap", -] [[package]] name = "object" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" +dependencies = [ + "crc32fast", + "indexmap", +] [[package]] name = "once_cell" @@ -2628,7 +2628,7 @@ dependencies = [ name = "wasmer-object" version = "1.0.2" dependencies = [ - "object 0.23.0", + "object 0.24.0", "thiserror", "wasmer-compiler", "wasmer-types", diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index bf6954df02d..721084c3601 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -574,16 +574,16 @@ name = "object" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" -dependencies = [ - "crc32fast", - "indexmap", -] [[package]] name = "object" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" +dependencies = [ + "crc32fast", + "indexmap", +] [[package]] name = "once_cell" @@ -1287,7 +1287,7 @@ dependencies = [ name = "wasmer-object" version = "1.0.2" dependencies = [ - "object 0.23.0", + "object 0.24.0", "thiserror", "wasmer-compiler", "wasmer-types", From 18732e4b65adb91c81ca013c1bd48c64bae54952 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 16:45:03 -0700 Subject: [PATCH 7/9] cargo fmt --- lib/compiler-llvm/src/object_file.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compiler-llvm/src/object_file.rs b/lib/compiler-llvm/src/object_file.rs index 67eb9240b0d..3ca82d88fda 100644 --- a/lib/compiler-llvm/src/object_file.rs +++ b/lib/compiler-llvm/src/object_file.rs @@ -165,7 +165,9 @@ where { let kind = match (reloc.kind(), reloc.size()) { (object::RelocationKind::Absolute, 64) => RelocationKind::Abs8, - (object::RelocationKind::Elf(object::elf::R_X86_64_PC64), 0) => RelocationKind::X86PCRel8, + (object::RelocationKind::Elf(object::elf::R_X86_64_PC64), 0) => { + RelocationKind::X86PCRel8 + } _ => { return Err(CompileError::Codegen(format!( "unknown relocation {:?}", From 41561a45d8368e36b4337753246920aee18d6595 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 17:03:30 -0700 Subject: [PATCH 8/9] Move back to object 0.23. There's nothing wrong with 0.24 but we have a dependency on 0.23 through 'backtrace' which is used by wasmer-engine, and we'd like to only have one copy. --- Cargo.lock | 21 +++++++++++---------- fuzz/Cargo.lock | 19 ++++++++++--------- lib/compiler-llvm/Cargo.toml | 2 +- lib/object/Cargo.toml | 2 +- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c756175533..ad1e20aa1a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,7 +105,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.23.0", + "object", "rustc-demangle", ] @@ -1323,15 +1323,10 @@ name = "object" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" - -[[package]] -name = "object" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" dependencies = [ "crc32fast", "indexmap", + "wasmparser 0.57.0", ] [[package]] @@ -2425,7 +2420,7 @@ dependencies = [ "thiserror", "wasmer-types", "wasmer-vm", - "wasmparser", + "wasmparser 0.77.0", ] [[package]] @@ -2461,7 +2456,7 @@ dependencies = [ "lazy_static", "libc", "loupe", - "object 0.24.0", + "object", "rayon", "regex", "rustc_version 0.2.3", @@ -2628,7 +2623,7 @@ dependencies = [ name = "wasmer-object" version = "1.0.2" dependencies = [ - "object 0.24.0", + "object", "thiserror", "wasmer-compiler", "wasmer-types", @@ -2742,6 +2737,12 @@ dependencies = [ "wasmer-wast", ] +[[package]] +name = "wasmparser" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" + [[package]] name = "wasmparser" version = "0.77.0" diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 721084c3601..4887c8eec49 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -58,7 +58,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.23.0", + "object", "rustc-demangle", ] @@ -574,15 +574,10 @@ name = "object" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" - -[[package]] -name = "object" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" dependencies = [ "crc32fast", "indexmap", + "wasmparser 0.57.0", ] [[package]] @@ -1178,7 +1173,7 @@ dependencies = [ "lazy_static", "libc", "loupe", - "object 0.24.0", + "object", "rayon", "regex", "rustc_version", @@ -1287,7 +1282,7 @@ dependencies = [ name = "wasmer-object" version = "1.0.2" dependencies = [ - "object 0.24.0", + "object", "thiserror", "wasmer-compiler", "wasmer-types", @@ -1324,6 +1319,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "wasmparser" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" + [[package]] name = "wasmparser" version = "0.77.0" diff --git a/lib/compiler-llvm/Cargo.toml b/lib/compiler-llvm/Cargo.toml index 1c211f5aa0c..cd5465f7a03 100644 --- a/lib/compiler-llvm/Cargo.toml +++ b/lib/compiler-llvm/Cargo.toml @@ -17,7 +17,7 @@ wasmer-vm = { path = "../vm", version = "1.0.2" } wasmer-types = { path = "../types", version = "1.0.2" } target-lexicon = { version = "0.11", default-features = false } smallvec = "1.6" -object = { version = "0.24", default-features = false, features = ["read"] } +object = { version = "0.23", default-features = false, features = ["read"] } libc = { version = "^0.2", default-features = false } byteorder = "1" itertools = "0.10" diff --git a/lib/object/Cargo.toml b/lib/object/Cargo.toml index b90d8194417..bc7839ee4be 100644 --- a/lib/object/Cargo.toml +++ b/lib/object/Cargo.toml @@ -16,5 +16,5 @@ wasmer-compiler = { path = "../compiler", version = "1.0.2", default-features = "std", "translator" ] } -object = { version = "0.24", default-features = false, features = ["write"] } +object = { version = "0.23", default-features = false, features = ["write"] } thiserror = "1.0" From 3f62e9bcd4a566fc4d4e0bf5700582bf999774e5 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 3 May 2021 17:21:33 -0700 Subject: [PATCH 9/9] Skip the version of wasmparser depended on by object. --- deny.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/deny.toml b/deny.toml index afda14b8b2b..c5c5a462219 100644 --- a/deny.toml +++ b/deny.toml @@ -175,6 +175,7 @@ skip = [ { name = "semver-parser", version = "=0.7.0" }, { name = "rustc_version", version = "=0.2.3" }, { name = "itertools", version = "0.9.0" }, + { name = "wasmparser", version = "0.57.0" }, { name = "wast", version = "=24.0.0" }, ] # Similarly to `skip` allows you to skip certain crates during duplicate