From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../wasm/spec/exception-handling/directives.txt | 2 +- .../tests/wasm/spec/extended-const/directives.txt | 2 +- .../wasm/spec/function-references/directives.txt | 2 +- .../function-references/return_call_ref.wast.js | 2 +- js/src/jit-test/tests/wasm/spec/gc/directives.txt | 2 +- .../tests/wasm/spec/memory64/directives.txt | 2 +- .../tests/wasm/spec/memory64/memory64.wast.js | 24 ++++++++------- .../tests/wasm/spec/multi-memory/directives.txt | 2 +- .../wasm/spec/multi-memory/harness/harness.js | 9 ++++++ .../wasm/spec/multi-memory/memory_trap1.wast.js | 36 ++++++++++++++-------- .../tests/wasm/spec/relaxed-simd/directives.txt | 2 +- .../jit-test/tests/wasm/spec/spec/directives.txt | 2 +- .../jit-test/tests/wasm/spec/spec/global.wast.js | 2 +- .../jit-test/tests/wasm/spec/spec/memory.wast.js | 18 ++++++----- .../tests/wasm/spec/tail-call/directives.txt | 2 +- 15 files changed, 67 insertions(+), 42 deletions(-) (limited to 'js/src/jit-test/tests/wasm/spec') diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt b/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt index 51f58354cb..77f4127908 100644 --- a/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-exceptions; --wasm-exnref; skip-if: !wasmExceptionsEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_exnref=true; skip-if: !wasmExnRefEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt b/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt index 5b3d5f6d83..e93d8c8df0 100644 --- a/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/extended-const/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-extended-const; --no-wasm-gc; skip-if: !wasmExtendedConstEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_gc=false \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/function-references/directives.txt b/js/src/jit-test/tests/wasm/spec/function-references/directives.txt index bb76560525..a9cf6401e1 100644 --- a/js/src/jit-test/tests/wasm/spec/function-references/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/function-references/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-function-references; skip-if: !wasmFunctionReferencesEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_gc=true; skip-if: !wasmGcEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js b/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js index 3ea51a8cb0..df24798146 100644 --- a/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js +++ b/js/src/jit-test/tests/wasm/spec/function-references/return_call_ref.wast.js @@ -1,4 +1,4 @@ -// |jit-test| --wasm-tail-calls; skip-if: !wasmTailCallsEnabled() +// |jit-test| --setpref=wasm_tail_calls=true; skip-if: !wasmTailCallsEnabled() /* Copyright 2021 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/js/src/jit-test/tests/wasm/spec/gc/directives.txt b/js/src/jit-test/tests/wasm/spec/gc/directives.txt index c071d8b980..a9cf6401e1 100644 --- a/js/src/jit-test/tests/wasm/spec/gc/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/gc/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-gc; skip-if: !wasmGcEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_gc=true; skip-if: !wasmGcEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/memory64/directives.txt b/js/src/jit-test/tests/wasm/spec/memory64/directives.txt index bbc47fb788..740ef217b9 100644 --- a/js/src/jit-test/tests/wasm/spec/memory64/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/memory64/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; skip-if: !wasmMemory64Enabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_memory64=true; skip-if: !wasmMemory64Enabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js index 341742ab86..0af2f021bb 100644 --- a/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js +++ b/js/src/jit-test/tests/wasm/spec/memory64/memory64.wast.js @@ -27,17 +27,19 @@ let $2 = instantiate(`(module (memory i64 1 256))`); // ./test/core/memory64.wast:6 let $3 = instantiate(`(module (memory i64 0 65536))`); -// ./test/core/memory64.wast:8 -assert_invalid( - () => instantiate(`(module (memory i64 0) (memory i64 0))`), - `multiple memories`, -); - -// ./test/core/memory64.wast:9 -assert_invalid( - () => instantiate(`(module (memory (import "spectest" "memory") i64 0) (memory i64 0))`), - `multiple memories`, -); +if (!wasmMultiMemoryEnabled()) { + // ./test/core/memory64.wast:8 + assert_invalid( + () => instantiate(`(module (memory i64 0) (memory i64 0))`), + `multiple memories`, + ); + + // ./test/core/memory64.wast:9 + assert_invalid( + () => instantiate(`(module (memory (import "spectest" "memory") i64 0) (memory i64 0))`), + `multiple memories`, + ); +} // ./test/core/memory64.wast:11 let $4 = instantiate(`(module (memory i64 (data)) (func (export "memsize") (result i64) (memory.size)))`); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt b/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt index 9211583549..7c18d36751 100644 --- a/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-multi-memory; skip-if: !wasmMultiMemoryEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_multi_memory=true; skip-if: !wasmMultiMemoryEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js b/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js index a96781e8ed..e03b3f35db 100644 --- a/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/harness/harness.js @@ -19,6 +19,15 @@ if (!wasmIsSupported()) { quit(); } +function partialOobWriteMayWritePartialData() { + let arm_native = getBuildConfiguration("arm") && !getBuildConfiguration("arm-simulator"); + let arm64_native = getBuildConfiguration("arm64") && !getBuildConfiguration("arm64-simulator"); + return arm_native || arm64_native; +} + +let native_arm = getBuildConfiguration("arm") && !getBuildConfiguration("arm-simulator"); +let native_arm64 = getBuildConfiguration("arm64") && !getBuildConfiguration("arm64-simulator"); + function bytes(type, bytes) { var typedBuffer = new Uint8Array(bytes); return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); diff --git a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js index ef68a1c0ec..35b8bd5a80 100644 --- a/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js +++ b/js/src/jit-test/tests/wasm/spec/multi-memory/memory_trap1.wast.js @@ -562,11 +562,15 @@ assert_trap(() => invoke($0, `i64.load32_u`, [-3]), `out of bounds memory access // ./test/core/multi-memory/memory_trap1.wast:234 assert_trap(() => invoke($0, `i64.load32_u`, [-4]), `out of bounds memory access`); -// ./test/core/multi-memory/memory_trap1.wast:237 -assert_return(() => invoke($0, `i64.load`, [65528]), [value("i64", 7523094288207667809n)]); +// Bug 1842293 - do not observe the partial store caused by bug 1666747 on +// some native platforms. +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/multi-memory/memory_trap1.wast:237 + assert_return(() => invoke($0, `i64.load`, [65528]), [value("i64", 7523094288207667809n)]); -// ./test/core/multi-memory/memory_trap1.wast:238 -assert_return(() => invoke($0, `i64.load`, [0]), [value("i64", 7523094288207667809n)]); + // ./test/core/multi-memory/memory_trap1.wast:238 + assert_return(() => invoke($0, `i64.load`, [0]), [value("i64", 7523094288207667809n)]); +} // ./test/core/multi-memory/memory_trap1.wast:242 assert_return(() => invoke($0, `i64.store`, [65528, 0n]), []); @@ -574,14 +578,18 @@ assert_return(() => invoke($0, `i64.store`, [65528, 0n]), []); // ./test/core/multi-memory/memory_trap1.wast:243 assert_trap(() => invoke($0, `i32.store`, [65533, 305419896]), `out of bounds memory access`); -// ./test/core/multi-memory/memory_trap1.wast:244 -assert_return(() => invoke($0, `i32.load`, [65532]), [value("i32", 0)]); +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/multi-memory/memory_trap1.wast:244 + assert_return(() => invoke($0, `i32.load`, [65532]), [value("i32", 0)]); +} // ./test/core/multi-memory/memory_trap1.wast:245 assert_trap(() => invoke($0, `i64.store`, [65529, 1311768467294899695n]), `out of bounds memory access`); -// ./test/core/multi-memory/memory_trap1.wast:246 -assert_return(() => invoke($0, `i64.load`, [65528]), [value("i64", 0n)]); +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/multi-memory/memory_trap1.wast:246 + assert_return(() => invoke($0, `i64.load`, [65528]), [value("i64", 0n)]); +} // ./test/core/multi-memory/memory_trap1.wast:247 assert_trap( @@ -589,8 +597,10 @@ assert_trap( `out of bounds memory access`, ); -// ./test/core/multi-memory/memory_trap1.wast:248 -assert_return(() => invoke($0, `f32.load`, [65532]), [value("f32", 0)]); +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/multi-memory/memory_trap1.wast:248 + assert_return(() => invoke($0, `f32.load`, [65532]), [value("f32", 0)]); +} // ./test/core/multi-memory/memory_trap1.wast:249 assert_trap( @@ -598,5 +608,7 @@ assert_trap( `out of bounds memory access`, ); -// ./test/core/multi-memory/memory_trap1.wast:250 -assert_return(() => invoke($0, `f64.load`, [65528]), [value("f64", 0)]); +if (!partialOobWriteMayWritePartialData()) { + // ./test/core/multi-memory/memory_trap1.wast:250 + assert_return(() => invoke($0, `f64.load`, [65528]), [value("f64", 0)]); +} diff --git a/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt b/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt index 625758af79..bbeff405b1 100644 --- a/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/relaxed-simd/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-relaxed-simd; skip-if: !wasmRelaxedSimdEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_relaxed_simd=true; skip-if: !wasmRelaxedSimdEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/spec/directives.txt b/js/src/jit-test/tests/wasm/spec/spec/directives.txt index 9fa4f75347..b26fb254a9 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/spec/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; test-also=--no-avx; skip-variant-if: --no-avx, !getBuildConfiguration('x86') && !getBuildConfiguration('x64') || getBuildConfiguration('simulator') \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; test-also=--no-avx; skip-variant-if: --no-avx, !getBuildConfiguration('x86') && !getBuildConfiguration('x64') || getBuildConfiguration('simulator') \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/spec/global.wast.js b/js/src/jit-test/tests/wasm/spec/spec/global.wast.js index e3351d3421..7f2502cc27 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/global.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/global.wast.js @@ -1,4 +1,4 @@ -// |jit-test| --no-wasm-gc +// |jit-test| --setpref=wasm_gc=false /* Copyright 2021 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js b/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js index 831bb26d69..211f610b69 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/memory.wast.js @@ -33,14 +33,16 @@ let $4 = instantiate(`(module (memory 1 256))`); // ./test/core/memory.wast:8 let $5 = instantiate(`(module (memory 0 65536))`); -// ./test/core/memory.wast:10 -assert_invalid(() => instantiate(`(module (memory 0) (memory 0))`), `multiple memories`); - -// ./test/core/memory.wast:11 -assert_invalid( - () => instantiate(`(module (memory (import "spectest" "memory") 0) (memory 0))`), - `multiple memories`, -); +if (!wasmMultiMemoryEnabled()) { + // ./test/core/memory.wast:10 + assert_invalid(() => instantiate(`(module (memory 0) (memory 0))`), `multiple memories`); + + // ./test/core/memory.wast:11 + assert_invalid( + () => instantiate(`(module (memory (import "spectest" "memory") 0) (memory 0))`), + `multiple memories`, + ); +} // ./test/core/memory.wast:13 let $6 = instantiate(`(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))`); diff --git a/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt b/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt index 223b6b843a..fbd3639abc 100644 --- a/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/tail-call/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--wasm-test-serialization; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --wasm-tail-calls; skip-if: !wasmTailCallsEnabled() \ No newline at end of file +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--setpref=wasm_test_serialization=true; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; --setpref=wasm_tail_calls=true; skip-if: !wasmTailCallsEnabled() \ No newline at end of file -- cgit v1.2.3