diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c7d0ef6..1651f7ffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Blocks of changes will separated by version increments. ## **[Unreleased]** +- [#790](https://github.com/wasmerio/wasmer/pull/790) Fix flaky test failure with LLVM, switch to large code model. - [#788](https://github.com/wasmerio/wasmer/pull/788) Use union merge on the changelog file. - [#785](https://github.com/wasmerio/wasmer/pull/785) Include Apache license file for spectests. - [#786](https://github.com/wasmerio/wasmer/pull/786) In the LLVM backend, lower atomic wasm operations to atomic machine instructions. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aad922544..fae1d39b5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,6 +50,16 @@ jobs: - template: .azure/install-llvm.yml - template: .azure/install-sccache.yml - template: .azure/install-cmake.yml + - bash: | + hostname + uname -a + displayName: System info (*nix) + condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT'))) + - bash: | + cat /proc/cpuinfo + cat /proc/meminfo + displayName: System info - Extended (Linux) + condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) - bash: make test displayName: Tests (*nix) condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Windows_NT'))) diff --git a/lib/llvm-backend/src/backend.rs b/lib/llvm-backend/src/backend.rs index a0fb80c03..682bd7278 100644 --- a/lib/llvm-backend/src/backend.rs +++ b/lib/llvm-backend/src/backend.rs @@ -189,8 +189,8 @@ impl LLVMBackend { &TargetMachine::get_host_cpu_name().to_string(), &TargetMachine::get_host_cpu_features().to_string(), OptimizationLevel::Aggressive, - RelocMode::PIC, - CodeModel::Default, + RelocMode::Static, + CodeModel::Large, ) .unwrap(); diff --git a/lib/singlepass-backend/src/codegen_x64.rs b/lib/singlepass-backend/src/codegen_x64.rs index e069dfeeb..a12b2557f 100644 --- a/lib/singlepass-backend/src/codegen_x64.rs +++ b/lib/singlepass-backend/src/codegen_x64.rs @@ -353,7 +353,7 @@ impl RunnableModule for X64ExecutionContext { #[derive(Debug)] pub struct CodegenError { - pub message: &'static str, + pub message: String, } #[derive(Copy, Clone, Debug)] @@ -474,7 +474,7 @@ impl ModuleCodeGenerator Some(x) => x, None => { return Err(CodegenError { - message: "label not found", + message: format!("label not found"), }); } }; @@ -482,7 +482,7 @@ impl ModuleCodeGenerator Some(x) => x, None => { return Err(CodegenError { - message: "offset is none", + message: format!("offset is none"), }); } }; @@ -3873,7 +3873,11 @@ impl FunctionCodeGenerator for X64FunctionCode { returns: match ty { WpTypeOrFuncType::Type(WpType::EmptyBlockType) => smallvec![], WpTypeOrFuncType::Type(inner_ty) => smallvec![inner_ty], - _ => panic!("multi-value returns not yet implemented"), + _ => { + return Err(CodegenError { + message: format!("multi-value returns not yet implemented"), + }) + } }, value_stack_depth: self.value_stack.len(), state: self.machine.state.clone(), @@ -3980,7 +3984,11 @@ impl FunctionCodeGenerator for X64FunctionCode { returns: match ty { WpTypeOrFuncType::Type(WpType::EmptyBlockType) => smallvec![], WpTypeOrFuncType::Type(inner_ty) => smallvec![inner_ty], - _ => panic!("multi-value returns not yet implemented"), + _ => { + return Err(CodegenError { + message: format!("multi-value returns not yet implemented"), + }) + } }, value_stack_depth: self.value_stack.len(), state: self.machine.state.clone(), @@ -4005,7 +4013,11 @@ impl FunctionCodeGenerator for X64FunctionCode { returns: match ty { WpTypeOrFuncType::Type(WpType::EmptyBlockType) => smallvec![], WpTypeOrFuncType::Type(inner_ty) => smallvec![inner_ty], - _ => panic!("multi-value returns not yet implemented"), + _ => { + return Err(CodegenError { + message: format!("multi-value returns not yet implemented"), + }) + } }, value_stack_depth: self.value_stack.len(), state: self.machine.state.clone(), @@ -4966,7 +4978,9 @@ impl FunctionCodeGenerator for X64FunctionCode { } } _ => { - panic!("not yet implemented: {:?}", op); + return Err(CodegenError { + message: format!("not yet implemented: {:?}", op), + }); } } diff --git a/lib/spectests/tests/excludes.txt b/lib/spectests/tests/excludes.txt index 2f077f559..118e2520a 100644 --- a/lib/spectests/tests/excludes.txt +++ b/lib/spectests/tests/excludes.txt @@ -862,6 +862,7 @@ llvm:skip:unreachable.wast:*:windows llvm:skip:unwind.wast:*:windows # LLVM Linux after OSR - https://github.com/wasmerio/wasmer/pull/567 +llvm:skip:simd.wast:352:unix # Module - caught panic Any llvm:skip:simd.wast:355:unix # Module - caught panic Any llvm:skip:simd_binaryen.wast:*:unix # Module - caught panic Any