mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-04 18:10:18 +00:00
Merge branch 'master' into feature/llvm-nan-fix
This commit is contained in:
commit
1097f88fb1
17
Cargo.lock
generated
17
Cargo.lock
generated
@ -1359,7 +1359,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "wabt"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1397,7 +1397,7 @@ dependencies = [
|
||||
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.6.0",
|
||||
"wasmer-dev-utils 0.6.0",
|
||||
"wasmer-emscripten 0.6.0",
|
||||
@ -1484,7 +1484,7 @@ name = "wasmer-emscripten-tests"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.6.0",
|
||||
"wasmer-dev-utils 0.6.0",
|
||||
"wasmer-emscripten 0.6.0",
|
||||
@ -1516,8 +1516,7 @@ dependencies = [
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.6.0",
|
||||
"wasmparser 0.35.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1528,7 +1527,7 @@ name = "wasmer-middleware-common"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.6.0",
|
||||
"wasmer-llvm-backend 0.6.0",
|
||||
"wasmer-runtime-core 0.6.0",
|
||||
@ -1543,7 +1542,7 @@ dependencies = [
|
||||
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.6.0",
|
||||
"wasmer-llvm-backend 0.6.0",
|
||||
"wasmer-runtime-core 0.6.0",
|
||||
@ -1609,7 +1608,7 @@ name = "wasmer-spectests"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.6.0",
|
||||
"wasmer-llvm-backend 0.6.0",
|
||||
"wasmer-runtime-core 0.6.0",
|
||||
@ -1889,7 +1888,7 @@ dependencies = [
|
||||
"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
|
||||
"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
|
||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
"checksum wabt 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d07edd40d190ddcbd0113c2150ccb214f47a02ff36958630ba0e5b8138ece1c1"
|
||||
"checksum wabt 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "94b5f5d6984ca42df66280baa8a15ac188a173ddaf4580b574a98931c01920e7"
|
||||
"checksum wabt-sys 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b064c81821100adb4b71923cecfc67fef083db21c3bbd454b0162c7ffe63eeaa"
|
||||
"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1"
|
||||
"checksum wasmer-clif-fork-frontend 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bd6bec1587a3b11222f4ff129fd119785713c41de413f54f99d3c03743812f4"
|
||||
|
@ -22,7 +22,7 @@ include = [
|
||||
byteorder = "1.3.2"
|
||||
errno = "0.2.4"
|
||||
structopt = "0.2.18"
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
wasmer-clif-backend = { path = "lib/clif-backend" }
|
||||
wasmer-singlepass-backend = { path = "lib/singlepass-backend", optional = true }
|
||||
wasmer-middleware-common = { path = "lib/middleware-common" }
|
||||
@ -60,7 +60,7 @@ members = [
|
||||
]
|
||||
|
||||
[build-dependencies]
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
glob = "0.3.0"
|
||||
rustc_version = "0.2.3"
|
||||
|
||||
|
@ -16,7 +16,7 @@ wasmer-llvm-backend = { path = "../llvm-backend", version = "0.6.0", optional =
|
||||
wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.6.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
wasmer-dev-utils = { path = "../dev-utils", version = "0.6.0"}
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -33,7 +33,7 @@ semver = "0.9"
|
||||
rustc_version = "0.2.3"
|
||||
|
||||
[dev-dependencies]
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
|
||||
[features]
|
||||
debug = ["wasmer-runtime-core/debug"]
|
||||
|
@ -105,6 +105,11 @@ fn get_callbacks() -> Callbacks {
|
||||
fn_name!("vm.memory.grow.static.local") => vmcalls::local_static_memory_grow as _,
|
||||
fn_name!("vm.memory.size.static.local") => vmcalls::local_static_memory_size as _,
|
||||
|
||||
fn_name!("vm.memory.grow.dynamic.import") => vmcalls::imported_dynamic_memory_grow as _,
|
||||
fn_name!("vm.memory.size.dynamic.import") => vmcalls::imported_dynamic_memory_size as _,
|
||||
fn_name!("vm.memory.grow.static.import") => vmcalls::imported_static_memory_grow as _,
|
||||
fn_name!("vm.memory.size.static.import") => vmcalls::imported_static_memory_size as _,
|
||||
|
||||
fn_name!("vm.exception.trap") => throw_trap as _,
|
||||
fn_name!("vm.breakpoint") => throw_breakpoint as _,
|
||||
|
||||
|
@ -1246,7 +1246,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
builder.build_store(ptr_to_value, value);
|
||||
}
|
||||
GlobalCache::Const { value: _ } => {
|
||||
unreachable!("cannot set non-mutable globals")
|
||||
return Err(CodegenError {
|
||||
message: "global is immutable".to_string(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ wasmer-llvm-backend = { path = "../llvm-backend", version = "0.6.0", optional =
|
||||
wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.6.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
criterion = "0.2"
|
||||
|
||||
[features]
|
||||
|
@ -73,6 +73,12 @@ impl Memory {
|
||||
}
|
||||
}
|
||||
|
||||
if desc.shared && desc.maximum.is_none() {
|
||||
return Err(CreationError::InvalidDescriptor(
|
||||
"Max number of pages is required for shared memory".to_string(),
|
||||
));
|
||||
}
|
||||
|
||||
let variant = if !desc.shared {
|
||||
MemoryVariant::Unshared(UnsharedMemory::new(desc)?)
|
||||
} else {
|
||||
@ -325,4 +331,17 @@ mod memory_tests {
|
||||
assert_eq!(unshared_memory.size(), Pages(10));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_descriptor_returns_error() {
|
||||
let result = Memory::new(MemoryDescriptor {
|
||||
minimum: Pages(10),
|
||||
maximum: None,
|
||||
shared: true,
|
||||
});
|
||||
assert!(
|
||||
result.is_err(),
|
||||
"Max number of pages is required for shared memory"
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -92,7 +92,8 @@ pub fn read_module<
|
||||
|
||||
let mut namespace_builder = Some(StringTableBuilder::new());
|
||||
let mut name_builder = Some(StringTableBuilder::new());
|
||||
let mut func_count: usize = ::std::usize::MAX;
|
||||
let mut func_count: usize = 0;
|
||||
let mut mcg_info_fed = false;
|
||||
|
||||
loop {
|
||||
use wasmparser::ParserState;
|
||||
@ -196,9 +197,9 @@ pub fn read_module<
|
||||
info.write().unwrap().start_func = Some(FuncIndex::new(start_index as usize));
|
||||
}
|
||||
ParserState::BeginFunctionBody { .. } => {
|
||||
let id = func_count.wrapping_add(1);
|
||||
func_count = id;
|
||||
if func_count == 0 {
|
||||
let id = func_count;
|
||||
if !mcg_info_fed {
|
||||
mcg_info_fed = true;
|
||||
info.write().unwrap().namespace_table =
|
||||
namespace_builder.take().unwrap().finish();
|
||||
info.write().unwrap().name_table = name_builder.take().unwrap().finish();
|
||||
@ -279,6 +280,7 @@ pub fn read_module<
|
||||
.map_err(|x| LoadError::Codegen(x))?;
|
||||
fcg.finalize()
|
||||
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
||||
func_count = func_count.wrapping_add(1);
|
||||
}
|
||||
ParserState::BeginActiveElementSectionEntry(table_index) => {
|
||||
let table_index = TableIndex::new(table_index as usize);
|
||||
@ -369,12 +371,17 @@ pub fn read_module<
|
||||
info.write().unwrap().globals.push(global_init);
|
||||
}
|
||||
ParserState::EndWasm => {
|
||||
if namespace_builder.is_some() {
|
||||
// TODO Consolidate with BeginFunction body if possible
|
||||
if !mcg_info_fed {
|
||||
info.write().unwrap().namespace_table =
|
||||
namespace_builder.take().unwrap().finish();
|
||||
}
|
||||
if name_builder.is_some() {
|
||||
info.write().unwrap().name_table = name_builder.take().unwrap().finish();
|
||||
mcg.feed_signatures(info.read().unwrap().signatures.clone())
|
||||
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
||||
mcg.feed_function_signatures(info.read().unwrap().func_assoc.clone())
|
||||
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
||||
mcg.check_precondition(&info.read().unwrap())
|
||||
.map_err(|x| LoadError::Codegen(format!("{:?}", x)))?;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ optional = true
|
||||
[dev-dependencies]
|
||||
tempfile = "3.1.0"
|
||||
criterion = "0.2"
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
|
||||
[dependencies.wasmer-llvm-backend]
|
||||
path = "../llvm-backend"
|
||||
|
@ -15,10 +15,10 @@ wasmer-llvm-backend = { path = "../llvm-backend", version = "0.6.0", optional =
|
||||
wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.6.0", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
|
||||
[dev-dependencies]
|
||||
wabt = "0.9.0"
|
||||
wabt = "0.9.1"
|
||||
|
||||
[features]
|
||||
default = ["fast-tests"]
|
||||
|
@ -17,21 +17,20 @@
|
||||
#
|
||||
|
||||
# Cranelift
|
||||
clif:skip:names.wast:* # Names file has parsing error?
|
||||
clif:skip:simd.wast:* # SIMD not implemented
|
||||
clif:skip:simd_binaryen.wast:* # SIMD not implemented
|
||||
|
||||
# linking.wast:387,388 appear to be related to WABT issue: https://github.com/pepyakin/wabt-rs/issues/51
|
||||
|
||||
clif:fail:globals.wast:243 # AssertInvalid - Should be invalid
|
||||
clif:fail:linking.wast:137 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3062 - illegal instruction"
|
||||
clif:fail:linking.wast:139 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3062 - illegal instruction"
|
||||
clif:fail:linking.wast:142 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3062 - illegal instruction"
|
||||
clif:fail:linking.wast:144 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3062 - illegal instruction"
|
||||
clif:fail:linking.wast:147 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3037 - illegal instruction"
|
||||
clif:fail:linking.wast:149 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3037 - illegal instruction"
|
||||
clif:fail:linking.wast:185 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3062 - illegal instruction"
|
||||
clif:fail:linking.wast:187 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x1069f3062 - illegal instruction"
|
||||
clif:fail:linking.wast:137 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883062 - illegal instruction"
|
||||
clif:fail:linking.wast:139 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883062 - illegal instruction"
|
||||
clif:fail:linking.wast:142 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883062 - illegal instruction"
|
||||
clif:fail:linking.wast:144 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883062 - illegal instruction"
|
||||
clif:fail:linking.wast:147 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883037 - illegal instruction"
|
||||
clif:fail:linking.wast:149 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883037 - illegal instruction"
|
||||
clif:fail:linking.wast:185 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883062 - illegal instruction"
|
||||
clif:fail:linking.wast:187 # AssertTrap - expected trap, got Runtime:Error "unknown trap at 0x106883062 - illegal instruction"
|
||||
clif:fail:linking.wast:387 # AssertReturn - result I32(0) ("0x0") does not match expected I32(104) ("0x68")
|
||||
clif:fail:linking.wast:388 # AssertReturn - Call failed RuntimeError: WebAssembly trap occurred during runtime: `call_indirect` out-of-bounds
|
||||
|
||||
@ -816,9 +815,6 @@ llvm:skip:f64.wast:2418
|
||||
llvm:skip:br_table.wast:1255
|
||||
llvm:skip:imports.wast:391 # Running forever
|
||||
llvm:skip:imports.wast:402 # Running forever
|
||||
llvm:skip:imports.wast:487 # LLVM ERROR: Program used external function '_vm.memory.grow.static.import' which could not be resolved!
|
||||
llvm:skip:linking.wast:306 # LLVM ERROR: Program used external function '_vm.memory.grow.static.import' which could not be resolved!
|
||||
llvm:skip:names.wast:* # Names file has parsing error?
|
||||
llvm:skip:call.wast:273 # Spec running forever
|
||||
llvm:skip:call_indirect.wast:556 # Spec running forever
|
||||
llvm:skip:call_indirect.wast:557 # Spec running forever
|
||||
@ -827,106 +823,13 @@ llvm:skip:skip-stack-guard-page.wast:* # Spec running forever or (signal: 4, SIG
|
||||
llvm:skip:linking.wast:236 # terminating with uncaught exception of type WasmTrap
|
||||
llvm:skip:linking.wast:248 # terminating with uncaught exception of type WasmTrap
|
||||
|
||||
llvm:fail:binary-leb128.wast:56 # Module - caught panic Any
|
||||
llvm:fail:binary-leb128.wast:65 # Module - caught panic Any
|
||||
llvm:fail:binary-leb128.wast:74 # Module - caught panic Any
|
||||
llvm:fail:binary-leb128.wast:86 # Module - caught panic Any
|
||||
llvm:fail:binary-leb128.wast:98 # Module - caught panic Any
|
||||
llvm:fail:binary.wast:446 # Module - caught panic Any
|
||||
llvm:fail:data.wast:27 # Module - caught panic Any
|
||||
llvm:fail:data.wast:40 # Module - caught panic Any
|
||||
llvm:fail:data.wast:50 # Module - caught panic Any
|
||||
llvm:fail:data.wast:55 # Module - caught panic Any
|
||||
llvm:fail:data.wast:61 # Module - caught panic Any
|
||||
llvm:fail:data.wast:66 # Module - caught panic Any
|
||||
llvm:fail:data.wast:83 # Module - caught panic Any
|
||||
llvm:fail:data.wast:98 # Module - caught panic Any
|
||||
llvm:fail:data.wast:117 # Module - caught panic Any
|
||||
llvm:fail:data.wast:127 # Module - caught panic Any
|
||||
llvm:fail:data.wast:132 # Module - caught panic Any
|
||||
llvm:fail:data.wast:137 # Module - caught panic Any
|
||||
llvm:fail:data.wast:143 # Module - caught panic Any
|
||||
llvm:fail:data.wast:149 # Module - caught panic Any
|
||||
llvm:fail:data.wast:154 # Module - caught panic Any
|
||||
llvm:fail:data.wast:186 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:data.wast:194 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:data.wast:211 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:data.wast:227 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:data.wast:258 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:data.wast:273 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:elem.wast:101 # Module - caught panic Any
|
||||
llvm:fail:elem.wast:143 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:elem.wast:152 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:elem.wast:161 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:elem.wast:170 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:elem.wast:178 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:elem.wast:195 # AssertUnlinkable - instantiate successful, expected unlinkable
|
||||
llvm:fail:elem.wast:212 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:elem.wast:366 # AssertReturn - Call failed RuntimeError: WebAssembly trap occurred during runtime: incorrect `call_indirect` signature
|
||||
llvm:fail:elem.wast:367 # AssertReturn - result I32(65) ("0x41") does not match expected I32(68) ("0x44")
|
||||
llvm:fail:elem.wast:379 # AssertReturn - Call failed RuntimeError: WebAssembly trap occurred during runtime: incorrect `call_indirect` signature
|
||||
llvm:fail:elem.wast:380 # AssertReturn - result I32(65) ("0x41") does not match expected I32(69) ("0x45")
|
||||
llvm:fail:elem.wast:381 # AssertReturn - result I32(66) ("0x42") does not match expected I32(70) ("0x46")
|
||||
llvm:fail:globals.wast:243 # AssertInvalid - caught panic Any
|
||||
llvm:fail:i32.wast:243 # AssertReturn - result I32(205242703) ("0xc3bc14f") does not match expected I32(32) ("0x20")
|
||||
llvm:fail:i32.wast:252 # AssertReturn - result I32(205242720) ("0xc3bc160") does not match expected I32(32) ("0x20")
|
||||
llvm:fail:i64.wast:243 # AssertReturn - result I64(4500210159) ("0x10c3bc1ef") does not match expected I64(64) ("0x40")
|
||||
llvm:fail:i64.wast:252 # AssertReturn - result I64(4500210144) ("0x10c3bc1e0") does not match expected I64(64) ("0x40")
|
||||
llvm:fail:imports.wast:98 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:99 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:100 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:101 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:102 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:103 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:104 # Module - caught panic Any
|
||||
llvm:fail:imports.wast:107 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:111 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:116 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:120 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:124 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:128 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:132 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:136 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:140 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:144 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:148 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:152 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:156 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:160 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:164 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:168 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:172 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:176 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:181 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:185 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:189 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:193 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:197 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:201 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:imports.wast:491 # AssertReturn - Call failed ResolveError: ExportNotFound { name: "grow" }
|
||||
llvm:fail:imports.wast:492 # AssertReturn - Call failed ResolveError: ExportNotFound { name: "grow" }
|
||||
llvm:fail:imports.wast:493 # AssertReturn - Call failed ResolveError: ExportNotFound { name: "grow" }
|
||||
llvm:fail:imports.wast:494 # AssertReturn - Call failed ResolveError: ExportNotFound { name: "grow" }
|
||||
llvm:fail:imports.wast:495 # AssertReturn - Call failed ResolveError: ExportNotFound { name: "grow" }
|
||||
llvm:fail:imports.wast:574 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:linking.wast:22 # Module - caught panic Any
|
||||
llvm:fail:linking.wast:26 # Register - No instance available
|
||||
llvm:fail:linking.wast:28 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:linking.wast:32 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:linking.wast:314 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:315 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:316 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:317 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:318 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:319 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:320 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:321 # AssertReturn - No instance available: Some("$Pm")
|
||||
llvm:fail:linking.wast:324 # AssertUnlinkable - caught panic Any
|
||||
llvm:fail:f32.wast:1621 # AssertReturn - result F32(0) ("0x0") does not match expected F32(2147483648) ("0x80000000")
|
||||
llvm:fail:f32.wast:2020 # AssertReturn - result F32(2147483648) ("0x80000000") does not match expected F32(0) ("0x0")
|
||||
llvm:fail:f64.wast:1621 # AssertReturn - result F64(0) ("0x0") does not match expected F64(9223372036854775808) ("0x8000000000000000")
|
||||
llvm:fail:f64.wast:2020 # AssertReturn - result F64(9223372036854775808) ("0x8000000000000000") does not match expected F64(0) ("0x0")
|
||||
llvm:fail:linking.wast:387 # AssertReturn - result I32(0) ("0x0") does not match expected I32(104) ("0x68")
|
||||
llvm:fail:linking.wast:388 # AssertReturn - Call failed RuntimeError: WebAssembly trap occurred during runtime: incorrect `call_indirect` signature
|
||||
llvm:fail:load.wast:201 # AssertReturn - result I32(80568351) ("0x4cd601f") does not match expected I32(32) ("0x20")
|
||||
llvm:fail:start.wast:92 # Module - caught panic Any
|
||||
llvm:fail:type.wast:3 # Module - caught panic Any
|
||||
llvm:fail:load.wast:201 # AssertReturn - result I32(285315103) ("0x1101901f") does not match expected I32(32) ("0x20")
|
||||
|
||||
# LLVM Windows
|
||||
llvm:skip:address.wast:*:windows
|
||||
@ -953,7 +856,6 @@ llvm:skip:unreachable.wast:*:windows
|
||||
llvm:skip:unwind.wast:*:windows
|
||||
|
||||
# Singlepass
|
||||
singlepass:skip:names.wast:* # Names file has parsing error?
|
||||
singlepass:skip:simd.wast:* # SIMD not implemented
|
||||
singlepass:skip:simd_binaryen.wast:* # SIMD not implemented
|
||||
|
||||
@ -1200,6 +1102,7 @@ singlepass:fail:exports.wast:167 # Module - caught panic Any
|
||||
singlepass:fail:exports.wast:168 # Module - caught panic Any
|
||||
singlepass:fail:exports.wast:169 # Module - caught panic Any
|
||||
singlepass:fail:exports.wast:170 # Module - caught panic Any
|
||||
singlepass:fail:f32.wast:1620 # AssertReturn - result F32(0) ("0x0") does not match expected F32(2147483648) ("0x80000000")
|
||||
singlepass:fail:f32.wast:1652 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:1654 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:1656 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
@ -1304,6 +1207,7 @@ singlepass:fail:f32.wast:2013 # "AssertReturnArithmeticNan" - value is not arith
|
||||
singlepass:fail:f32.wast:2014 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2017 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2018 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2021 # AssertReturn - result F32(2147483648) ("0x80000000") does not match expected F32(0) ("0x0")
|
||||
singlepass:fail:f32.wast:2052 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2054 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2056 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
@ -1408,6 +1312,7 @@ singlepass:fail:f32.wast:2413 # "AssertReturnArithmeticNan" - value is not arith
|
||||
singlepass:fail:f32.wast:2414 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2417 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f32.wast:2418 # "AssertReturnArithmeticNan" - value is not arithmetic nan F32(NaN)
|
||||
singlepass:fail:f64.wast:1620 # AssertReturn - result F64(0) ("0x0") does not match expected F64(9223372036854775808) ("0x8000000000000000")
|
||||
singlepass:fail:f64.wast:1652 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:1654 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:1656 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
@ -1512,6 +1417,7 @@ singlepass:fail:f64.wast:2013 # "AssertReturnArithmeticNan" - value is not arith
|
||||
singlepass:fail:f64.wast:2014 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:2017 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:2018 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:2021 # AssertReturn - result F64(9223372036854775808) ("0x8000000000000000") does not match expected F64(0) ("0x0")
|
||||
singlepass:fail:f64.wast:2052 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:2054 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
singlepass:fail:f64.wast:2056 # "AssertReturnArithmeticNan" - value is not arithmetic nan F64(NaN)
|
||||
|
@ -291,10 +291,9 @@ mod tests {
|
||||
Ok(values) => {
|
||||
for (i, v) in values.iter().enumerate() {
|
||||
let expected_value =
|
||||
convert_value(*expected.get(i).unwrap());
|
||||
if *v != expected_value
|
||||
&& !(*v != *v && expected_value != expected_value)
|
||||
{
|
||||
convert_wabt_value(*expected.get(i).unwrap());
|
||||
let v = convert_wasmer_value(v.clone());
|
||||
if v != expected_value {
|
||||
test_report.add_failure(SpecFailure {
|
||||
file: filename.to_string(),
|
||||
line,
|
||||
@ -968,6 +967,35 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub enum SpectestValue {
|
||||
I32(i32),
|
||||
I64(i64),
|
||||
F32(u32),
|
||||
F64(u64),
|
||||
V128(u128),
|
||||
}
|
||||
|
||||
fn convert_wasmer_value(other: wasmer_runtime_core::types::Value) -> SpectestValue {
|
||||
match other {
|
||||
wasmer_runtime_core::types::Value::I32(v) => SpectestValue::I32(v),
|
||||
wasmer_runtime_core::types::Value::I64(v) => SpectestValue::I64(v),
|
||||
wasmer_runtime_core::types::Value::F32(v) => SpectestValue::F32(v.to_bits()),
|
||||
wasmer_runtime_core::types::Value::F64(v) => SpectestValue::F64(v.to_bits()),
|
||||
wasmer_runtime_core::types::Value::V128(v) => SpectestValue::V128(v),
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_wabt_value(other: Value<f32, f64>) -> SpectestValue {
|
||||
match other {
|
||||
Value::I32(v) => SpectestValue::I32(v),
|
||||
Value::I64(v) => SpectestValue::I64(v),
|
||||
Value::F32(v) => SpectestValue::F32(v.to_bits()),
|
||||
Value::F64(v) => SpectestValue::F64(v.to_bits()),
|
||||
Value::V128(v) => SpectestValue::V128(v),
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_value(other: Value<f32, f64>) -> wasmer_runtime_core::types::Value {
|
||||
match other {
|
||||
Value::I32(v) => wasmer_runtime_core::types::Value::I32(v),
|
||||
@ -978,13 +1006,13 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
fn to_hex(v: wasmer_runtime_core::types::Value) -> String {
|
||||
fn to_hex(v: SpectestValue) -> String {
|
||||
match v {
|
||||
wasmer_runtime_core::types::Value::I32(v) => format!("{:#x}", v),
|
||||
wasmer_runtime_core::types::Value::I64(v) => format!("{:#x}", v),
|
||||
wasmer_runtime_core::types::Value::F32(v) => format!("{:#x}", v.to_bits()),
|
||||
wasmer_runtime_core::types::Value::F64(v) => format!("{:#x}", v.to_bits()),
|
||||
wasmer_runtime_core::types::Value::V128(v) => format!("{:#x}", v),
|
||||
SpectestValue::I32(v) => format!("{:#x}", v),
|
||||
SpectestValue::I64(v) => format!("{:#x}", v),
|
||||
SpectestValue::F32(v) => format!("{:#x}", v),
|
||||
SpectestValue::F64(v) => format!("{:#x}", v),
|
||||
SpectestValue::V128(v) => format!("{:#x}", v),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user