diff --git a/CHANGELOG.md b/CHANGELOG.md index a848cb6871a..42e104d7af5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## **[Unreleased]** +- [#1129](https://github.com/wasmerio/wasmer/pull/1129) Standard exception types for singlepass backend. + ## 0.13.1 - 2020-01-16 - Fix bug in wapm related to the `package.wasmer_extra_flags` entry in the manifest diff --git a/lib/runtime-core/src/backend.rs b/lib/runtime-core/src/backend.rs index 4bfb25c1587..db6b8ef65f9 100644 --- a/lib/runtime-core/src/backend.rs +++ b/lib/runtime-core/src/backend.rs @@ -122,6 +122,32 @@ pub struct CompilerConfig { pub backend_specific_config: Option, } +/// An exception table for a `RunnableModule`. +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +pub struct ExceptionTable { + /// Mappings from offsets in generated machine code to the corresponding exception code. + pub offset_to_code: HashMap, +} + +impl ExceptionTable { + pub fn new() -> Self { + Self::default() + } +} + +/// The code of an exception. +#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)] +pub enum ExceptionCode { + /// An `unreachable` opcode was executed. + Unreachable, + + /// An arithmetic exception, e.g. divided by zero. + Arithmetic, + + /// Memory access exception, e.g. misaligned/out-of-bound read/write. + Memory, +} + pub trait Compiler { /// Compiles a `Module` from WebAssembly binary format. /// The `CompileToken` parameter ensures that this can only @@ -153,6 +179,10 @@ pub trait RunnableModule: Send + Sync { None } + fn get_exception_table(&self) -> Option<&ExceptionTable> { + None + } + unsafe fn patch_local_function(&self, _idx: usize, _target_address: usize) -> bool { false } diff --git a/lib/runtime-core/src/error.rs b/lib/runtime-core/src/error.rs index 391386e3b4f..266bd444e27 100644 --- a/lib/runtime-core/src/error.rs +++ b/lib/runtime-core/src/error.rs @@ -1,5 +1,6 @@ //! The error module contains the data structures and helper functions used to implement errors that //! are produced and returned from the wasmer runtime core. +use crate::backend::ExceptionCode; use crate::types::{FuncSig, GlobalDescriptor, MemoryDescriptor, TableDescriptor, Type}; use core::borrow::Borrow; use std::any::Any; @@ -208,6 +209,8 @@ impl std::fmt::Display for RuntimeError { write!(f, "\"{}\"", s) } else if let Some(s) = data.downcast_ref::<&str>() { write!(f, "\"{}\"", s) + } else if let Some(exc_code) = data.downcast_ref::() { + write!(f, "Caught exception of type \"{:?}\".", exc_code) } else { write!(f, "unknown error") } diff --git a/lib/runtime-core/src/fault.rs b/lib/runtime-core/src/fault.rs index 2628e5df5c4..d30578624f6 100644 --- a/lib/runtime-core/src/fault.rs +++ b/lib/runtime-core/src/fault.rs @@ -375,15 +375,23 @@ extern "C" fn signal_trap_handler( _ => {} } + // Now we have looked up all possible handler tables but failed to find a handler + // for this exception that allows a normal return. + // + // So here we check whether this exception is caused by a suspend signal, return the + // state image if so, or throw the exception out otherwise. + let ctx: &mut vm::Ctx = &mut **CURRENT_CTX.with(|x| x.get()); let es_image = fault .read_stack(None) .expect("fault.read_stack() failed. Broken invariants?"); if is_suspend_signal { + // If this is a suspend signal, we parse the runtime state and return the resulting image. let image = build_instance_image(ctx, es_image); unwind_result = Box::new(image); } else { + // Otherwise, this is a real exception and we just throw it to the caller. if es_image.frames.len() > 0 { eprintln!( "\n{}", @@ -391,7 +399,26 @@ extern "C" fn signal_trap_handler( ); es_image.print_backtrace_if_needed(); } - // Just let the error propagate otherwise + + // Look up the exception tables and try to find an exception code. + let exc_code = CURRENT_CODE_VERSIONS.with(|versions| { + let versions = versions.borrow(); + for v in versions.iter() { + if let Some(table) = v.runnable_module.get_exception_table() { + let ip = fault.ip.get(); + let end = v.base + v.msm.total_size; + if ip >= v.base && ip < end { + if let Some(exc_code) = table.offset_to_code.get(&(ip - v.base)) { + return Some(*exc_code); + } + } + } + } + None + }); + if let Some(code) = exc_code { + unwind_result = Box::new(code); + } } true diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index a4913896d4b..b26dc50e9b1 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -94,7 +94,7 @@ #[macro_use] extern crate serde_derive; -pub use wasmer_runtime_core::backend::Features; +pub use wasmer_runtime_core::backend::{ExceptionCode, Features}; pub use wasmer_runtime_core::codegen::{MiddlewareChain, StreamingCompiler}; pub use wasmer_runtime_core::export::Export; pub use wasmer_runtime_core::global::Global; @@ -111,6 +111,12 @@ pub use wasmer_runtime_core::Func; pub use wasmer_runtime_core::{compile_with, validate}; pub use wasmer_runtime_core::{func, imports}; +#[cfg(unix)] +pub use wasmer_runtime_core::{ + fault::{pop_code_version, push_code_version}, + state::CodeVersion, +}; + pub mod memory { //! The memory module contains the implementation data structures and helper functions used to //! manipulate and access wasm memory. diff --git a/lib/singlepass-backend/src/codegen_x64.rs b/lib/singlepass-backend/src/codegen_x64.rs index 3dc12ea291f..b58b84cedf5 100644 --- a/lib/singlepass-backend/src/codegen_x64.rs +++ b/lib/singlepass-backend/src/codegen_x64.rs @@ -23,8 +23,8 @@ use std::{ use wasmer_runtime_core::{ backend::{ sys::{Memory, Protect}, - Architecture, CacheGen, CompilerConfig, InlineBreakpoint, InlineBreakpointType, - MemoryBoundCheckMode, RunnableModule, Token, + Architecture, CacheGen, CompilerConfig, ExceptionCode, ExceptionTable, InlineBreakpoint, + InlineBreakpointType, MemoryBoundCheckMode, RunnableModule, Token, }, cache::{Artifact, Error as CacheError}, codegen::*, @@ -226,6 +226,8 @@ pub struct X64FunctionCode { unreachable_depth: usize, config: Arc, + + exception_table: Option, } enum FuncPtrInner {} @@ -244,6 +246,7 @@ pub struct X64ExecutionContext { breakpoints: BreakpointMap, func_import_count: usize, msm: ModuleStateMap, + exception_table: ExceptionTable, } /// On-disk cache format. @@ -266,6 +269,9 @@ pub struct CacheImage { /// Module state map. msm: ModuleStateMap, + + /// An exception table that maps instruction offsets to exception codes. + exception_table: ExceptionTable, } #[derive(Debug)] @@ -324,6 +330,10 @@ impl RunnableModule for X64ExecutionContext { Some(self.breakpoints.clone()) } + fn get_exception_table(&self) -> Option<&ExceptionTable> { + Some(&self.exception_table) + } + unsafe fn patch_local_function(&self, idx: usize, target_address: usize) -> bool { /* 0: 48 b8 42 42 42 42 42 42 42 42 movabsq $4774451407313060418, %rax @@ -669,18 +679,21 @@ impl ModuleCodeGenerator &mut self, _module_info: Arc>, ) -> Result<&mut X64FunctionCode, CodegenError> { - let (mut assembler, mut function_labels, breakpoints) = match self.functions.last_mut() { - Some(x) => ( - x.assembler.take().unwrap(), - x.function_labels.take().unwrap(), - x.breakpoints.take().unwrap(), - ), - None => ( - self.assembler.take().unwrap(), - self.function_labels.take().unwrap(), - HashMap::new(), - ), - }; + let (mut assembler, mut function_labels, breakpoints, exception_table) = + match self.functions.last_mut() { + Some(x) => ( + x.assembler.take().unwrap(), + x.function_labels.take().unwrap(), + x.breakpoints.take().unwrap(), + x.exception_table.take().unwrap(), + ), + None => ( + self.assembler.take().unwrap(), + self.function_labels.take().unwrap(), + HashMap::new(), + ExceptionTable::new(), + ), + }; let begin_offset = assembler.offset(); let begin_label_info = function_labels @@ -714,6 +727,7 @@ impl ModuleCodeGenerator machine, unreachable_depth: 0, config: self.config.as_ref().unwrap().clone(), + exception_table: Some(exception_table), }; self.functions.push(code); Ok(self.functions.last_mut().unwrap()) @@ -723,18 +737,21 @@ impl ModuleCodeGenerator mut self, _: &ModuleInfo, ) -> Result<(X64ExecutionContext, Box), CodegenError> { - let (assembler, function_labels, breakpoints) = match self.functions.last_mut() { - Some(x) => ( - x.assembler.take().unwrap(), - x.function_labels.take().unwrap(), - x.breakpoints.take().unwrap(), - ), - None => ( - self.assembler.take().unwrap(), - self.function_labels.take().unwrap(), - HashMap::new(), - ), - }; + let (assembler, function_labels, breakpoints, exception_table) = + match self.functions.last_mut() { + Some(x) => ( + x.assembler.take().unwrap(), + x.function_labels.take().unwrap(), + x.breakpoints.take().unwrap(), + x.exception_table.take().unwrap(), + ), + None => ( + self.assembler.take().unwrap(), + self.function_labels.take().unwrap(), + HashMap::new(), + ExceptionTable::new(), + ), + }; let total_size = assembler.get_offset().0; let _output = assembler.finalize().unwrap(); @@ -804,6 +821,7 @@ impl ModuleCodeGenerator function_offsets: out_offsets.iter().map(|x| x.0 as usize).collect(), func_import_count: self.func_import_count, msm: msm.clone(), + exception_table: exception_table.clone(), }; let cache = SinglepassCache { @@ -819,6 +837,7 @@ impl ModuleCodeGenerator function_pointers: out_labels, function_offsets: out_offsets, msm: msm, + exception_table, }, Box::new(cache), )) @@ -922,6 +941,7 @@ impl ModuleCodeGenerator breakpoints: Arc::new(HashMap::new()), func_import_count: cache_image.func_import_count, msm: cache_image.msm, + exception_table: cache_image.exception_table, }; Ok(ModuleInner { runnable_module: Arc::new(Box::new(ec)), @@ -954,10 +974,27 @@ impl X64FunctionCode { .insert(m.state.wasm_inst_offset, SuspendOffset::Trappable(offset)); } + /// Marks each address in the code range emitted by `f` with the exception code `code`. + fn mark_range_with_exception_code R, R>( + a: &mut Assembler, + etable: &mut ExceptionTable, + code: ExceptionCode, + f: F, + ) -> R { + let begin = a.get_offset().0; + let ret = f(a); + let end = a.get_offset().0; + for i in begin..end { + etable.offset_to_code.insert(i, code); + } + ret + } + /// Moves `loc` to a valid location for `div`/`idiv`. fn emit_relaxed_xdiv( a: &mut Assembler, m: &mut Machine, + etable: &mut ExceptionTable, op: fn(&mut Assembler, Size, Location), sz: Size, loc: Location, @@ -969,10 +1006,16 @@ impl X64FunctionCode { Location::Imm64(_) | Location::Imm32(_) => { a.emit_mov(sz, loc, Location::GPR(GPR::RCX)); // must not be used during div (rax, rdx) Self::mark_trappable(a, m, fsm, control_stack); + etable + .offset_to_code + .insert(a.get_offset().0, ExceptionCode::Arithmetic); op(a, sz, Location::GPR(GPR::RCX)); } _ => { Self::mark_trappable(a, m, fsm, control_stack); + etable + .offset_to_code + .insert(a.get_offset().0, ExceptionCode::Arithmetic); op(a, sz, loc); } } @@ -1883,6 +1926,7 @@ impl X64FunctionCode { config: &CodegenConfig, a: &mut Assembler, m: &mut Machine, + etable: &mut ExceptionTable, addr: Location, memarg: &MemoryImmediate, check_alignment: bool, @@ -1956,7 +2000,10 @@ impl X64FunctionCode { // Trap if the end address of the requested area is above that of the linear memory. a.emit_add(Size::S64, Location::GPR(tmp_base), Location::GPR(tmp_addr)); a.emit_cmp(Size::S64, Location::GPR(tmp_bound), Location::GPR(tmp_addr)); - a.emit_conditional_trap(Condition::Above); + + Self::mark_range_with_exception_code(a, etable, ExceptionCode::Memory, |a| { + a.emit_conditional_trap(Condition::Above) + }); m.release_temp_gpr(tmp_bound); } @@ -1996,11 +2043,15 @@ impl X64FunctionCode { Location::Imm32(align - 1), Location::GPR(tmp_aligncheck), ); - a.emit_conditional_trap(Condition::NotEqual); + Self::mark_range_with_exception_code(a, etable, ExceptionCode::Memory, |a| { + a.emit_conditional_trap(Condition::NotEqual) + }); m.release_temp_gpr(tmp_aligncheck); } - cb(a, m, tmp_addr)?; + Self::mark_range_with_exception_code(a, etable, ExceptionCode::Memory, |a| { + cb(a, m, tmp_addr) + })?; m.release_temp_gpr(tmp_addr); Ok(()) @@ -2012,6 +2063,7 @@ impl X64FunctionCode { config: &CodegenConfig, a: &mut Assembler, m: &mut Machine, + etable: &mut ExceptionTable, loc: Location, target: Location, ret: Location, @@ -2045,6 +2097,7 @@ impl X64FunctionCode { config, a, m, + etable, target, memarg, true, @@ -2115,6 +2168,7 @@ impl X64FunctionCode { fn emit_f32_int_conv_check_trap( a: &mut Assembler, m: &mut Machine, + etable: &mut ExceptionTable, reg: XMM, lower_bound: f32, upper_bound: f32, @@ -2124,6 +2178,9 @@ impl X64FunctionCode { Self::emit_f32_int_conv_check(a, m, reg, lower_bound, upper_bound, trap, trap, trap, end); a.emit_label(trap); + etable + .offset_to_code + .insert(a.get_offset().0, ExceptionCode::Arithmetic); a.emit_ud2(); a.emit_label(end); } @@ -2239,6 +2296,7 @@ impl X64FunctionCode { fn emit_f64_int_conv_check_trap( a: &mut Assembler, m: &mut Machine, + etable: &mut ExceptionTable, reg: XMM, lower_bound: f64, upper_bound: f64, @@ -2248,6 +2306,9 @@ impl X64FunctionCode { Self::emit_f64_int_conv_check(a, m, reg, lower_bound, upper_bound, trap, trap, trap, end); a.emit_label(trap); + etable + .offset_to_code + .insert(a.get_offset().0, ExceptionCode::Arithmetic); a.emit_ud2(); a.emit_label(end); } @@ -2372,7 +2433,12 @@ impl FunctionCodeGenerator for X64FunctionCode { ), Location::GPR(GPR::RSP), ); - a.emit_conditional_trap(Condition::Below); + Self::mark_range_with_exception_code( + a, + self.exception_table.as_mut().unwrap(), + ExceptionCode::Memory, + |a| a.emit_conditional_trap(Condition::Below), + ); } self.locals = self @@ -2795,6 +2861,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_div, Size::S32, loc_b, @@ -2820,6 +2887,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_idiv, Size::S32, loc_b, @@ -2845,6 +2913,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_div, Size::S32, loc_b, @@ -2896,6 +2965,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_idiv, Size::S32, loc_b, @@ -3194,6 +3264,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_div, Size::S64, loc_b, @@ -3219,6 +3290,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_idiv, Size::S64, loc_b, @@ -3244,6 +3316,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_div, Size::S64, loc_b, @@ -3303,6 +3376,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_relaxed_xdiv( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), Assembler::emit_idiv, Size::S64, loc_b, @@ -4755,6 +4829,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f32_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF32_LT_U32_MIN, LEF32_GT_U32_MAX, @@ -4866,6 +4941,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f32_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF32_LT_I32_MIN, LEF32_GT_I32_MAX, @@ -4983,6 +5059,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f32_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF32_LT_I64_MIN, LEF32_GT_I64_MAX, @@ -5100,6 +5177,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f32_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF32_LT_U64_MIN, LEF32_GT_U64_MAX, @@ -5260,6 +5338,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f64_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF64_LT_U32_MIN, LEF64_GT_U32_MAX, @@ -5377,6 +5456,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f64_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), real_in, GEF64_LT_I32_MIN, LEF64_GT_I32_MAX, @@ -5500,6 +5580,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f64_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF64_LT_I64_MIN, LEF64_GT_I64_MAX, @@ -5618,6 +5699,7 @@ impl FunctionCodeGenerator for X64FunctionCode { Self::emit_f64_int_conv_check_trap( a, &mut self.machine, + self.exception_table.as_mut().unwrap(), tmp_in, GEF64_LT_U64_MIN, LEF64_GT_U64_MAX, @@ -6217,7 +6299,12 @@ impl FunctionCodeGenerator for X64FunctionCode { Location::GPR(table_base), ); a.emit_cmp(Size::S32, func_index, Location::GPR(table_count)); - a.emit_conditional_trap(Condition::BelowEqual); + Self::mark_range_with_exception_code( + a, + self.exception_table.as_mut().unwrap(), + ExceptionCode::Memory, + |a| a.emit_conditional_trap(Condition::BelowEqual), + ); a.emit_mov(Size::S64, func_index, Location::GPR(table_count)); a.emit_imul_imm32_gpr64(vm::Anyfunc::size() as u32, table_count); a.emit_add( @@ -6243,7 +6330,12 @@ impl FunctionCodeGenerator for X64FunctionCode { Location::GPR(sigidx), Location::Memory(table_count, (vm::Anyfunc::offset_sig_id() as usize) as i32), ); - a.emit_conditional_trap(Condition::NotEqual); + Self::mark_range_with_exception_code( + a, + self.exception_table.as_mut().unwrap(), + ExceptionCode::Memory, + |a| a.emit_conditional_trap(Condition::NotEqual), + ); self.machine.release_temp_gpr(sigidx); self.machine.release_temp_gpr(table_count); @@ -6594,6 +6686,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6626,6 +6719,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6658,6 +6752,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6691,6 +6786,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6724,6 +6820,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6757,6 +6854,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6786,6 +6884,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -6814,6 +6913,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -6842,6 +6942,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -6870,6 +6971,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -6902,6 +7004,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6934,6 +7037,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6966,6 +7070,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -6999,6 +7104,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -7032,6 +7138,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -7065,6 +7172,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -7098,6 +7206,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -7145,6 +7254,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, false, @@ -7174,6 +7284,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -7202,6 +7313,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -7230,6 +7342,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -7258,6 +7371,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -7286,6 +7400,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, false, @@ -7305,6 +7420,11 @@ impl FunctionCodeGenerator for X64FunctionCode { } Operator::Unreachable => { Self::mark_trappable(a, &self.machine, &mut self.fsm, &mut self.control_stack); + self.exception_table + .as_mut() + .unwrap() + .offset_to_code + .insert(a.get_offset().0, ExceptionCode::Unreachable); a.emit_ud2(); self.unreachable_depth = 1; } @@ -7533,6 +7653,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7565,6 +7686,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7598,6 +7720,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7627,6 +7750,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7655,6 +7779,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7683,6 +7808,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7715,6 +7841,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7747,6 +7874,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7780,6 +7908,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7813,6 +7942,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -7856,6 +7986,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7884,6 +8015,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7912,6 +8044,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7940,6 +8073,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target_addr, memarg, true, @@ -7976,6 +8110,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8011,6 +8146,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8046,6 +8182,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8077,6 +8214,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8112,6 +8250,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8143,6 +8282,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8178,6 +8318,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8214,6 +8355,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8250,6 +8392,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8286,6 +8429,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8318,6 +8462,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8354,6 +8499,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8386,6 +8532,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8422,6 +8569,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -8455,6 +8603,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8484,6 +8633,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8513,6 +8663,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8542,6 +8693,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8571,6 +8723,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8600,6 +8753,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8629,6 +8783,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8658,6 +8813,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8687,6 +8843,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8716,6 +8873,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8745,6 +8903,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8774,6 +8933,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8803,6 +8963,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8832,6 +8993,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8861,6 +9023,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8890,6 +9053,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8919,6 +9083,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8948,6 +9113,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -8977,6 +9143,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -9006,6 +9173,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -9035,6 +9203,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), loc, target, ret, @@ -9066,6 +9235,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9097,6 +9267,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9128,6 +9299,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9159,6 +9331,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9190,6 +9363,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9221,6 +9395,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9252,6 +9427,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9297,6 +9473,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9347,6 +9524,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9397,6 +9575,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9447,6 +9626,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9497,6 +9677,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9547,6 +9728,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, @@ -9597,6 +9779,7 @@ impl FunctionCodeGenerator for X64FunctionCode { &self.config, a, &mut self.machine, + self.exception_table.as_mut().unwrap(), target, memarg, true, diff --git a/lib/spectests/tests/excludes.txt b/lib/spectests/tests/excludes.txt index 4919f9338b3..b6690cc99d2 100644 --- a/lib/spectests/tests/excludes.txt +++ b/lib/spectests/tests/excludes.txt @@ -312,7 +312,6 @@ singlepass:skip:simd_binaryen.wast:* # SIMD not implemented singlepass:skip:atomic.wast:*:*:aarch64 # Threads not yet supported on singlepass -singlepass:fail:address.wast:192 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:address.wast:194 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:195 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:196 # AssertTrap - expected trap, got [] @@ -323,7 +322,6 @@ singlepass:fail:address.wast:201 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:202 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:203 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:204 # AssertTrap - expected trap, got [] -singlepass:fail:address.wast:479 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:address.wast:481 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:482 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:483 # AssertTrap - expected trap, got [] @@ -338,486 +336,140 @@ singlepass:fail:address.wast:492 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:493 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:494 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:495 # AssertTrap - expected trap, got [] -singlepass:fail:address.wast:539 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:address.wast:541 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:542 # AssertTrap - expected trap, got [] -singlepass:fail:address.wast:586 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:address.wast:588 # AssertTrap - expected trap, got [] singlepass:fail:address.wast:589 # AssertTrap - expected trap, got [] -singlepass:fail:align.wast:864 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:380 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:381 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:382 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:383 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:384 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:385 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:386 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:387 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:388 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:389 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:390 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:391 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:392 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:393 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:394 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:395 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:396 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:397 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:398 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:399 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:400 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:401 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:402 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:403 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:404 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:405 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:406 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:407 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:408 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:409 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:410 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:411 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:412 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:413 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:414 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:415 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:416 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:417 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:418 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:419 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:420 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:421 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:422 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:423 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:atomic.wast:424 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call.wast:289 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:469 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:470 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:471 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:472 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:473 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:479 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:480 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:486 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:487 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:493 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:494 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:500 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:call_indirect.wast:501 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:83 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:84 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:85 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:86 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:87 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:88 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:89 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:90 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:105 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:106 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:107 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:108 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:109 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:110 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:111 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:112 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:128 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:129 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:130 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:131 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:132 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:133 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:134 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:135 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:151 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:152 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:153 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:154 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:155 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:156 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:157 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:158 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:159 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:160 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:161 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:179 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:180 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:181 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:182 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:183 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:184 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:185 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:186 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:199 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:200 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:201 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:202 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:203 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:204 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:205 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:206 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:224 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:225 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:226 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:227 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:228 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:229 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:230 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:231 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:248 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:249 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:250 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:251 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:252 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:253 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:254 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:conversions.wast:255 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:elem.wast:353 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:func_ptrs.wast:78 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:func_ptrs.wast:79 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:func_ptrs.wast:80 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:func_ptrs.wast:89 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:func_ptrs.wast:90 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:func_ptrs.wast:91 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:globals.wast:221 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:globals.wast:243 # AssertInvalid - Should be invalid -singlepass:fail:i32.wast:62 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:63 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:64 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:82 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:83 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:99 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:100 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:120 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i32.wast:121 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:62 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:63 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:64 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:82 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:83 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:99 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:100 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:120 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:i64.wast:121 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:if.wast:440 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:283 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:286 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:287 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:302 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:305 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:306 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:391 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:imports.wast:402 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:113 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:114 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:115 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:116 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:132 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:133 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:134 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:135 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:196 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:197 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:198 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:199 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:349 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:int_exprs.wast:350 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:134 # AssertReturn - Call failed RuntimeError: unknown error -singlepass:fail:linking.wast:136 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:137 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:139 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:141 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:142 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:144 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:146 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:147 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:148 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:149 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:152 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:169 # AssertReturn - Call failed RuntimeError: unknown error singlepass:fail:linking.wast:175 # AssertReturn - Call failed RuntimeError: unknown error singlepass:fail:linking.wast:181 # AssertReturn - Call failed RuntimeError: unknown error -singlepass:fail:linking.wast:184 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:185 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:187 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:188 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:190 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:225 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:236 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:linking.wast:248 # AssertTrap - expected trap, got Runtime:Error unknown error singlepass:fail:linking.wast:388 # AssertReturn - Call failed RuntimeError: unknown error -singlepass:fail:memory_grow.wast:15 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_grow.wast:16 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_grow.wast:17 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_grow.wast:18 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_grow.wast:24 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_grow.wast:25 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_grow.wast:286 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:23 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:24 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:25 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:26 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:27 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:28 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:29 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:30 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:31 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:32 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:111 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:112 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:113 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:114 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:115 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:116 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:117 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:118 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:119 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:120 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:121 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:122 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:123 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:124 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:125 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:126 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:127 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:128 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:129 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:130 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:131 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:132 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:133 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:134 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:135 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:136 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:137 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:138 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:139 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:140 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:141 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:142 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:143 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:144 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:145 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:146 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:147 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:148 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:149 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:150 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:151 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:152 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:153 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:154 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:155 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:156 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:157 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:158 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:159 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:160 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:161 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:162 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:163 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:164 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:165 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:166 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:167 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:168 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:169 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:170 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:171 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:172 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:173 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:174 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:175 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:176 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:177 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:178 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:179 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:180 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:181 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:182 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:183 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:184 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:185 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:186 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:187 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:188 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:189 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:190 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:191 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:192 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:193 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:194 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:195 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:196 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:197 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:198 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:199 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:200 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:201 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:202 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:203 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:204 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:205 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:206 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:207 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:208 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:209 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:210 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:211 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:212 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:213 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:214 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:215 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:216 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:217 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:218 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:219 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:220 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:221 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:222 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:223 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:224 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:225 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:226 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:227 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:228 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:229 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:230 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:231 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:232 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:233 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:234 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:235 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:236 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:237 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:238 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:239 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:240 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:241 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:242 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:243 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:244 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:245 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:246 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:247 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:248 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:249 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:250 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:251 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:252 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:253 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:254 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:255 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:256 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:257 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:258 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:259 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:260 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:261 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:262 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:263 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:264 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:265 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:memory_trap.wast:266 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:select.wast:208 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:select.wast:209 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:select.wast:210 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:select.wast:211 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:select.wast:248 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:select.wast:249 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:16 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:17 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:18 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:19 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:20 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:21 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:34 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:35 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:36 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:37 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:50 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:51 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:52 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:53 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:54 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:55 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:56 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:57 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:78 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:79 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:80 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:81 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:82 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:83 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:84 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:85 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:86 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:87 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:88 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:89 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:90 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:traps.wast:91 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:218 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:219 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:220 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:221 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:223 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:224 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:225 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:226 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:228 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:229 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:230 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:231 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:234 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:235 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:236 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:239 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:241 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:242 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:243 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:245 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:246 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:247 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:248 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:249 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:251 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:253 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:254 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:256 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:259 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:260 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:261 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:262 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:263 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:265 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:266 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:267 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:269 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:270 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:271 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:272 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:274 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:275 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:276 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:278 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:279 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:281 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:282 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:283 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:284 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:286 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:288 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:289 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:291 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:293 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:294 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:296 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unreachable.wast:298 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:212 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:221 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:230 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:239 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:245 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:251 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:257 # AssertTrap - expected trap, got Runtime:Error unknown error -singlepass:fail:unwind.wast:263 # AssertTrap - expected trap, got Runtime:Error unknown error + +# These failures only happen on AArch64 and not on x86-64. +singlepass:fail:conversions.wast:83:*:aarch64 # AssertTrap - expected trap, got [I32(2147483647)] +singlepass:fail:conversions.wast:84:*:aarch64 # AssertTrap - expected trap, got [I32(-2147483648)] +singlepass:fail:conversions.wast:85:*:aarch64 # AssertTrap - expected trap, got [I32(2147483647)] +singlepass:fail:conversions.wast:86:*:aarch64 # AssertTrap - expected trap, got [I32(-2147483648)] +singlepass:fail:conversions.wast:87:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:88:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:89:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:90:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:105:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:106:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:107:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:108:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:109:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:110:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:111:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:112:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:128:*:aarch64 # AssertTrap - expected trap, got [I32(2147483647)] +singlepass:fail:conversions.wast:129:*:aarch64 # AssertTrap - expected trap, got [I32(-2147483648)] +singlepass:fail:conversions.wast:130:*:aarch64 # AssertTrap - expected trap, got [I32(2147483647)] +singlepass:fail:conversions.wast:131:*:aarch64 # AssertTrap - expected trap, got [I32(-2147483648)] +singlepass:fail:conversions.wast:132:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:133:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:134:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:135:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:151:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:152:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:153:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:154:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:155:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:156:*:aarch64 # AssertTrap - expected trap, got [I32(-1)] +singlepass:fail:conversions.wast:157:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:158:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:159:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:160:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:161:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:conversions.wast:179:*:aarch64 # AssertTrap - expected trap, got [I64(9223372036854775807)] +singlepass:fail:conversions.wast:180:*:aarch64 # AssertTrap - expected trap, got [I64(-9223372036854775808)] +singlepass:fail:conversions.wast:181:*:aarch64 # AssertTrap - expected trap, got [I64(9223372036854775807)] +singlepass:fail:conversions.wast:182:*:aarch64 # AssertTrap - expected trap, got [I64(-9223372036854775808)] +singlepass:fail:conversions.wast:183:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:184:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:185:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:186:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:199:*:aarch64 # AssertTrap - expected trap, got [I64(-1)] +singlepass:fail:conversions.wast:200:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:201:*:aarch64 # AssertTrap - expected trap, got [I64(-1)] +singlepass:fail:conversions.wast:202:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:203:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:204:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:205:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:206:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:224:*:aarch64 # AssertTrap - expected trap, got [I64(9223372036854775807)] +singlepass:fail:conversions.wast:225:*:aarch64 # AssertTrap - expected trap, got [I64(-9223372036854775808)] +singlepass:fail:conversions.wast:226:*:aarch64 # AssertTrap - expected trap, got [I64(9223372036854775807)] +singlepass:fail:conversions.wast:227:*:aarch64 # AssertTrap - expected trap, got [I64(-9223372036854775808)] +singlepass:fail:conversions.wast:228:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:229:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:230:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:231:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:248:*:aarch64 # AssertTrap - expected trap, got [I64(-1)] +singlepass:fail:conversions.wast:249:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:250:*:aarch64 # AssertTrap - expected trap, got [I64(-1)] +singlepass:fail:conversions.wast:251:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:252:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:253:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:254:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:conversions.wast:255:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:i32.wast:62:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:i32.wast:63:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:i32.wast:64:*:aarch64 # AssertTrap - expected trap, got [I32(-2147483648)] +singlepass:fail:i32.wast:82:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:i32.wast:83:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:i32.wast:99:*:aarch64 # AssertTrap - expected trap, got [I32(1)] +singlepass:fail:i32.wast:100:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:i32.wast:120:*:aarch64 # AssertTrap - expected trap, got [I32(1)] +singlepass:fail:i32.wast:121:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:i64.wast:62:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:i64.wast:63:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:i64.wast:64:*:aarch64 # AssertTrap - expected trap, got [I64(-9223372036854775808)] +singlepass:fail:i64.wast:82:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:i64.wast:83:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:i64.wast:99:*:aarch64 # AssertTrap - expected trap, got [I64(1)] +singlepass:fail:i64.wast:100:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:i64.wast:120:*:aarch64 # AssertTrap - expected trap, got [I64(1)] +singlepass:fail:i64.wast:121:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:113:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:int_exprs.wast:114:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:int_exprs.wast:115:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:116:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:132:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:int_exprs.wast:133:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:int_exprs.wast:134:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:135:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:196:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:int_exprs.wast:197:*:aarch64 # AssertTrap - expected trap, got [I32(0)] +singlepass:fail:int_exprs.wast:198:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:199:*:aarch64 # AssertTrap - expected trap, got [I64(0)] +singlepass:fail:int_exprs.wast:349:*:aarch64 # AssertTrap - expected trap, got [I32(-2147483648)] +singlepass:fail:int_exprs.wast:350:*:aarch64 # AssertTrap - expected trap, got [I64(-9223372036854775808)] +singlepass:fail:traps.wast:16:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:17:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:18:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:19:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:20:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:21:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:34:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:35:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:36:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:37:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:50:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:51:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:52:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:53:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:54:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:55:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:56:*:aarch64 # AssertTrap - expected trap, got [] +singlepass:fail:traps.wast:57:*:aarch64 # AssertTrap - expected trap, got [] \ No newline at end of file diff --git a/lib/spectests/tests/spectest.rs b/lib/spectests/tests/spectest.rs index 518e545d6bc..9c255740e12 100644 --- a/lib/spectests/tests/spectest.rs +++ b/lib/spectests/tests/spectest.rs @@ -616,9 +616,47 @@ mod tests { } => { let maybe_call_result = with_instance(instance.clone(), &named_modules, &module, |instance| { + #[cfg(unix)] + use wasmer_runtime::{ + pop_code_version, push_code_version, CodeVersion, + }; + + // Manually push code version before calling WebAssembly function, as a hack. + // + // This should eventually be fixed by doing push/pop code version in the function invocation + // logic itself. + + #[cfg(unix)] + let cv_pushed = if let Some(msm) = + instance.module.runnable_module.get_module_state_map() + { + push_code_version(CodeVersion { + baseline: true, + msm: msm, + base: instance + .module + .runnable_module + .get_code() + .unwrap() + .as_ptr() + as usize, + backend: backend.into(), + runnable_module: instance.module.runnable_module.clone(), + }); + true + } else { + false + }; let params: Vec = args.iter().cloned().map(convert_value).collect(); - instance.call(&field, ¶ms[..]) + let ret = instance.call(&field, ¶ms[..]); + #[cfg(unix)] + { + if cv_pushed { + pop_code_version().unwrap(); + } + } + ret }); if maybe_call_result.is_none() { test_report.add_failure( @@ -657,21 +695,28 @@ mod tests { // TODO assert message? test_report.count_passed() } - RuntimeError::Error { .. } => { - test_report.add_failure( - SpecFailure { - file: filename.to_string(), + RuntimeError::Error { ref data } => { + use wasmer_runtime::ExceptionCode; + if let Some(_) = + data.downcast_ref::() + { + test_report.count_passed(); + } else { + test_report.add_failure( + SpecFailure { + file: filename.to_string(), + line, + kind: format!("{}", "AssertTrap"), + message: format!( + "expected trap, got Runtime:Error {:?}", + r + ), + }, + &test_key, + excludes, line, - kind: format!("{}", "AssertTrap"), - message: format!( - "expected trap, got Runtime:Error {:?}", - r - ), - }, - &test_key, - excludes, - line, - ); + ); + } } } } diff --git a/src/bin/wasmer.rs b/src/bin/wasmer.rs index 537dfff9869..9d37e033832 100644 --- a/src/bin/wasmer.rs +++ b/src/bin/wasmer.rs @@ -42,6 +42,11 @@ use wasmer_runtime_core::{ loader::{Instance as LoadedInstance, LocalLoader}, Module, }; +#[cfg(unix)] +use wasmer_runtime_core::{ + fault::{pop_code_version, push_code_version}, + state::CodeVersion, +}; #[cfg(feature = "wasi")] use wasmer_wasi; @@ -478,12 +483,6 @@ fn execute_wasi( #[cfg(not(feature = "managed"))] { use wasmer_runtime::error::RuntimeError; - #[cfg(unix)] - use wasmer_runtime_core::{ - fault::{pop_code_version, push_code_version}, - state::CodeVersion, - }; - let result; #[cfg(unix)] @@ -862,11 +861,33 @@ fn execute_wasm(options: &Run) -> Result<(), String> { }; let args = options.parse_args(&module, invoke_fn)?; + #[cfg(unix)] + let cv_pushed = + if let Some(msm) = instance.module.runnable_module.get_module_state_map() { + push_code_version(CodeVersion { + baseline: true, + msm: msm, + base: instance.module.runnable_module.get_code().unwrap().as_ptr() as usize, + backend: options.backend.to_string(), + runnable_module: instance.module.runnable_module.clone(), + }); + true + } else { + false + }; + let result = instance .dyn_func(&invoke_fn) .map_err(|e| format!("{:?}", e))? .call(&args) .map_err(|e| format!("{:?}", e))?; + + #[cfg(unix)] + { + if cv_pushed { + pop_code_version().unwrap(); + } + } println!("{}({:?}) returned {:?}", invoke_fn, args, result); } }