Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/WebKit/WebKit
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 6, 2024
2 parents d217219 + f6bafe0 commit ddb52ad
Show file tree
Hide file tree
Showing 226 changed files with 17,876 additions and 1,807 deletions.
1 change: 1 addition & 0 deletions JSTests/wasm/stress/cc-i32-kitchen-sink.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ skip
//@ requireOptions("--useJITCage=0") # temporary workaround for rdar://127308350
//@ requireOptions("--useInterpretedJSEntryWrappers=1")
import { instantiate } from "../wabt-wrapper.js"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ skip if $architecture != "arm64" and $architecture != "x86_64" or $memoryLimited
//@ skip
//@ skip unless $isWasmPlatform
//@ requireOptions("--useJITCage=0") # temporary workaround for rdar://127308350
//@ runDefaultWasm("-m", "--wasmFunctionIndexRangeToCompile=0:5", "--useOMGJIT=0", "--useInterpretedJSEntryWrappers=1")
Expand Down
2 changes: 1 addition & 1 deletion JSTests/wasm/stress/cc-int-to-int-cross-module.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ skip if $architecture != "arm64" and $architecture != "x86_64"
//@ skip
//@ requireOptions("--useJITCage=0") # temporary workaround for rdar://127308350
//@ requireOptions("--useInterpretedJSEntryWrappers=1")
import { instantiate } from "../wabt-wrapper.js"
Expand Down
2 changes: 1 addition & 1 deletion JSTests/wasm/stress/cc-int-to-int-jit-to-llint.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ skip unless $isWasmPlatform
//@ skip
//@ runDefaultWasm("-m", "--wasmFunctionIndexRangeToCompile=1:2")
import { instantiate } from "../wabt-wrapper.js"
import * as assert from "../assert.js"
Expand Down
3 changes: 2 additions & 1 deletion JSTests/wasm/stress/cc-int-to-int-memory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Debugging: jsc -m cc-int-to-int.js --useConcurrentJIT=0 --useBBQJIT=0 --useOMGJIT=0 --jitAllowList=nothing --useDFGJIT=0 --dumpDisassembly=0 --forceICFailure=1 --useInterpretedJSEntryWrappers=1 --dumpDisassembly=0
//@ skip
//@ requireOptions("--useJITCage=0") # temporary workaround for rdar://127308350
//@ requireOptions("--useInterpretedJSEntryWrappers=1")
// Debugging: jsc -m cc-int-to-int.js --useConcurrentJIT=0 --useBBQJIT=0 --useOMGJIT=0 --jitAllowList=nothing --useDFGJIT=0 --dumpDisassembly=0 --forceICFailure=1 --useInterpretedJSEntryWrappers=1 --dumpDisassembly=0
import { instantiate } from "../wabt-wrapper.js"
import * as assert from "../assert.js"

Expand Down
3 changes: 1 addition & 2 deletions JSTests/wasm/stress/cc-int-to-int-no-jit.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ skip if $architecture != "arm64" and $architecture != "x86_64"
//@ skip unless $isWasmPlatform
//@ skip
//@ runDefaultWasm("-m", "--useJIT=0", "--useWebAssembly=1", "--useInterpretedJSEntryWrappers=1")
import { instantiate } from "../wabt-wrapper.js"
import * as assert from "../assert.js"
Expand Down
3 changes: 2 additions & 1 deletion JSTests/wasm/stress/cc-int-to-int.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Debugging: jsc -m cc-int-to-int.js --useConcurrentJIT=0 --useBBQJIT=0 --useOMGJIT=0 --jitAllowList=nothing --useDFGJIT=0 --dumpDisassembly=0 --forceICFailure=1 --useInterpretedJSEntryWrappers=1 --dumpDisassembly=0
//@ skip
//@ requireOptions("--useJITCage=0") # temporary workaround for rdar://127308350
//@ requireOptions("--useInterpretedJSEntryWrappers=1")
// Debugging: jsc -m cc-int-to-int.js --useConcurrentJIT=0 --useBBQJIT=0 --useOMGJIT=0 --jitAllowList=nothing --useDFGJIT=0 --dumpDisassembly=0 --forceICFailure=1 --useInterpretedJSEntryWrappers=1 --dumpDisassembly=0
import { instantiate } from "../wabt-wrapper.js"
import * as assert from "../assert.js"

Expand Down
6 changes: 0 additions & 6 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -6951,18 +6951,13 @@ imported/w3c/web-platform-tests/navigation-api/navigation-methods/navigate-repla
imported/w3c/web-platform-tests/navigation-api/navigate-event/signal-abort-detach-in-onnavigate.html [ Skip ]

# General flakes, almost exclusively on mac-wk2-stress.
imported/w3c/web-platform-tests/navigation-api/currententrychange-event/anchor-click.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-origin-traversal-does-not-fire-navigate.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigate-event/intercept-popstate.html [ Pass Timeout Failure ]
imported/w3c/web-platform-tests/navigation-api/navigation-activation/activation-replace.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/after-detach.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-history-entry/no-referrer-url-censored.html [ Pass Failure ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/back-forward-multiple-frames.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/disambigaute-back.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/navigate-state-repeated-await.html [ Timeout Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/back-204-205-download.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-detach-in-onnavigate.html [ Crash Pass Failure ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html [ Crash Timeout Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/reload-rejection-order-pagehide-unserializablestate.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html?currententrychange [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html?no-currententrychange [ Failure Pass ]
Expand All @@ -6974,7 +6969,6 @@ imported/w3c/web-platform-tests/navigation-api/ordering-and-transition/navigate-
imported/w3c/web-platform-tests/navigation-api/per-entry-events/dispose-after-bfcache.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/state/cross-document-away-and-back.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/state/cross-document-getState-undefined.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/basic.html [ Failure Pass ]
imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-origin-traversal-redirect.html [ Skip ]

# -- View Transitions -- #
Expand Down
8 changes: 4 additions & 4 deletions LayoutTests/crypto/crypto-random-values-oom.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
let exceptionString = undefined;

function useAllMemory() {
const a = [0];
const a = [];
a.length = 2**30;
a.__proto__ = {};
Object.defineProperty(a, 0, {get: foo});
Object.defineProperty(a, 80000000, {});

function foo() {
new Uint8Array(a);
}

new Promise(foo);
try {
for (let i = 0; i < 2**32; i++) {
new ArrayBuffer(1000);
for (let i = 0; i < 1000; i++) {
new ArrayBuffer(2**20);
}
} catch {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PASS if no assert or crash.
16 changes: 16 additions & 0 deletions LayoutTests/fast/inline/floating-dialog-becomes-modal-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<style>
dialog {
position: static;
float: right;
display: inline;
}
</style>
PASS if no assert or crash.
<dialog id=dialog>
<script>
if (window.testRunner)
testRunner.dumpAsText();

document.body.offsetHeight;
dialog.showModal();
</script>
7 changes: 7 additions & 0 deletions LayoutTests/fast/webgpu/regression/repro_274994-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONSOLE MESSAGE: 0
CONSOLE MESSAGE: no validation error
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
84 changes: 84 additions & 0 deletions LayoutTests/fast/webgpu/regression/repro_274994.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<script>
globalThis.testRunner?.waitUntilDone();
const log = console.debug;

onload = async () => {
let adapter = await navigator.gpu.requestAdapter({});
let device = await adapter.requestDevice({});
device.pushErrorScope('validation');
let earlierBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.UNIFORM, mappedAtCreation: true});
let earlierU32 = new Uint32Array(earlierBuffer.getMappedRange());
earlierU32[0] = 10101010;
earlierBuffer.unmap();
let vertexBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.VERTEX});
let code = `
struct VertexOutput {
@builtin(position) position : vec4f,
@location(0) @interpolate(flat) something: u32,
}
@vertex
fn v(@location(0) fromVertexBuffer: u32) -> VertexOutput {
var v = VertexOutput();
v.something = fromVertexBuffer;
return v;
}
@fragment
fn f(@location(0) @interpolate(flat) something: u32) -> @location(0) u32 {
return something;
}
`;
let module = device.createShaderModule({code});

let pipeline = device.createRenderPipeline({
layout: device.createPipelineLayout({bindGroupLayouts: []}),
vertex: {
module,
buffers: [{
arrayStride: 256,
attributes: [{format: 'uint32', offset: 0, shaderLocation: 0}],
}],
},
fragment: {module, targets: [{format: 'r32uint'}]},
primitive: {topology: 'point-list'},
});

let texture = device.createTexture({format: 'r32uint', size: [1], usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC});
let renderPassDescriptor = {
colorAttachments: [{
view: texture.createView(),
clearValue: [0, 0, 0, 0],
loadOp: 'clear', storeOp: 'store',
}],
};
let indirectBuffer = device.createBuffer({usage: GPUBufferUsage.INDIRECT, size: 16, mappedAtCreation: true});
let indirectU32 = new Uint32Array(indirectBuffer.getMappedRange());
indirectU32[0] = 1;
indirectU32[1] = 1;
indirectU32[2] = 0xff_ff_ff_ff;
indirectBuffer.unmap();
let commandEncoder = device.createCommandEncoder();
let renderPassEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);
renderPassEncoder.setPipeline(pipeline);
renderPassEncoder.setVertexBuffer(0, vertexBuffer);
renderPassEncoder.drawIndirect(indirectBuffer, 0);
renderPassEncoder.end();
let outputBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ});
commandEncoder.copyTextureToBuffer({texture}, {buffer: outputBuffer}, {width: 1});
device.queue.submit([commandEncoder.finish()]);
await device.queue.onSubmittedWorkDone();
await outputBuffer.mapAsync(GPUMapMode.READ);
let outputU32 = new Uint32Array(outputBuffer.getMappedRange());
log(outputU32);
outputBuffer.unmap();
let error = await device.popErrorScope();
if (error) {
log('validation error');
log(error.message);
} else {
log('no validation error');
}
globalThis.testRunner?.notifyDone();
};
</script>
7 changes: 7 additions & 0 deletions LayoutTests/fast/webgpu/regression/repro_274994b-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONSOLE MESSAGE: 0
CONSOLE MESSAGE: no validation error
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
85 changes: 85 additions & 0 deletions LayoutTests/fast/webgpu/regression/repro_274994b.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<script>
globalThis.testRunner?.waitUntilDone();
const log = console.debug;

onload = async () => {
let adapter = await navigator.gpu.requestAdapter({});
let device = await adapter.requestDevice({});
device.pushErrorScope('validation');
let earlierBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.UNIFORM, mappedAtCreation: true});
let earlierU32 = new Uint32Array(earlierBuffer.getMappedRange());
earlierU32[0] = 10101010;
earlierBuffer.unmap();
let vertexBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.VERTEX});
let code = `
struct VertexOutput {
@builtin(position) position : vec4f,
@location(0) @interpolate(flat) something: u32,
}
@vertex
fn v(@location(0) fromVertexBuffer: u32) -> VertexOutput {
var v = VertexOutput();
v.something = fromVertexBuffer;
return v;
}
@fragment
fn f(@location(0) @interpolate(flat) something: u32) -> @location(0) u32 {
return something;
}
`;
let module = device.createShaderModule({code});

let pipeline = device.createRenderPipeline({
layout: device.createPipelineLayout({bindGroupLayouts: []}),
vertex: {
module,
buffers: [{
arrayStride: 256,
stepMode: 'instance',
attributes: [{format: 'uint32', offset: 0, shaderLocation: 0}],
}],
},
fragment: {module, targets: [{format: 'r32uint'}]},
primitive: {topology: 'point-list'},
});

let texture = device.createTexture({format: 'r32uint', size: [1], usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC});
let renderPassDescriptor = {
colorAttachments: [{
view: texture.createView(),
clearValue: [0, 0, 0, 0],
loadOp: 'clear', storeOp: 'store',
}],
};
let indirectBuffer = device.createBuffer({usage: GPUBufferUsage.INDIRECT, size: 16, mappedAtCreation: true});
let indirectU32 = new Uint32Array(indirectBuffer.getMappedRange());
indirectU32[0] = 1;
indirectU32[1] = 1;
indirectU32[3] = 0xff_ff_ff_ff;
indirectBuffer.unmap();
let commandEncoder = device.createCommandEncoder();
let renderPassEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);
renderPassEncoder.setPipeline(pipeline);
renderPassEncoder.setVertexBuffer(0, vertexBuffer);
renderPassEncoder.drawIndirect(indirectBuffer, 0);
renderPassEncoder.end();
let outputBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ});
commandEncoder.copyTextureToBuffer({texture}, {buffer: outputBuffer}, {width: 1});
device.queue.submit([commandEncoder.finish()]);
await device.queue.onSubmittedWorkDone();
await outputBuffer.mapAsync(GPUMapMode.READ);
let outputU32 = new Uint32Array(outputBuffer.getMappedRange());
log(outputU32);
outputBuffer.unmap();
let error = await device.popErrorScope();
if (error) {
log('validation error');
log(error.message);
} else {
log('no validation error');
}
globalThis.testRunner?.notifyDone();
};
</script>
7 changes: 7 additions & 0 deletions LayoutTests/fast/webgpu/regression/repro_275111-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CONSOLE MESSAGE: 0
CONSOLE MESSAGE: no validation error
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
80 changes: 80 additions & 0 deletions LayoutTests/fast/webgpu/regression/repro_275111.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<script>
globalThis.testRunner?.waitUntilDone();
const log = console.debug;

const format = 'r32uint';

onload = async () => {
let adapter = await navigator.gpu.requestAdapter({});
let device = await adapter.requestDevice({});
device.pushErrorScope('validation');
let module = device.createShaderModule({
code: `
struct VertexOutput {
@builtin(position) position : vec4f,
@location(0) @interpolate(flat) something: u32,
}
@vertex
fn v(@location(0) fromVertexBuffer: u32) -> VertexOutput {
var v = VertexOutput();
v.something = fromVertexBuffer;
return v;
}
@fragment
fn f(@location(0) @interpolate(flat) something: u32) -> @location(0) u32 {
return something;
}
`,
});
let pipeline = device.createRenderPipeline({
layout: device.createPipelineLayout({bindGroupLayouts: []}),
vertex: {
module,
buffers: [{
arrayStride: 4,
attributes: [{format: 'uint32', offset: 0, shaderLocation: 0}],
}],
},
fragment: {module, targets: [{format}]},
primitive: {topology: 'point-list'},
});
let texture = device.createTexture({format, size: [1], usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC});
let renderPassDescriptor = {colorAttachments: [{view: texture.createView(), clearValue: [0, 0, 0, 0], loadOp: 'clear', storeOp: 'store'}]};
let commandEncoder = device.createCommandEncoder();
let renderPassEncoder = commandEncoder.beginRenderPass(renderPassDescriptor);
renderPassEncoder.setPipeline(pipeline);
let vertexBuffer = device.createBuffer({size: 260, usage: GPUBufferUsage.VERTEX});
let vertexBuffer2 = device.createBuffer({size: 4, usage: GPUBufferUsage.VERTEX});
let laterBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.QUERY_RESOLVE, mappedAtCreation: true});
new Uint32Array(laterBuffer.getMappedRange())[0] = 987654321;
laterBuffer.unmap();
let indexBuffer = device.createBuffer({usage: GPUBufferUsage.INDEX, size: 4, mappedAtCreation: true});
let indexU32 = new Uint32Array(indexBuffer.getMappedRange());
indexU32[0] = 64;
indexBuffer.unmap();
renderPassEncoder.setIndexBuffer(indexBuffer, 'uint32');
renderPassEncoder.setVertexBuffer(0, vertexBuffer);
renderPassEncoder.drawIndexed(1);
renderPassEncoder.setVertexBuffer(0, vertexBuffer2);
renderPassEncoder.drawIndexed(1);
renderPassEncoder.end();
let outputBuffer = device.createBuffer({size: 4, usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ});
commandEncoder.copyTextureToBuffer({texture}, {buffer: outputBuffer}, {width: 1});
let commandBuffer = commandEncoder.finish();
device.queue.submit([commandBuffer]);
await device.queue.onSubmittedWorkDone();
await outputBuffer.mapAsync(GPUMapMode.READ);
let outputU32 = new Uint32Array(outputBuffer.getMappedRange());
log(outputU32);
outputBuffer.unmap();
let error = await device.popErrorScope();
if (error) {
log(error.message);
} else {
log('no validation error');
}
globalThis.testRunner?.notifyDone();
};
</script>
Loading

0 comments on commit ddb52ad

Please sign in to comment.