Calling `array<f32>()` without a size crashes WebGPU on Windows
Categories
(Core :: Graphics: WebGPU, defect, P1)
Tracking
()
People
(Reporter: brandmairstefan, Unassigned)
References
Details
(Keywords: crash)
Crash Data
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0
Steps to reproduce:
I created a compute shader with the following code. There's also a index.html file attached which does the whole setup
@compute @workgroup_size(1)
fn main() {
let a = array<f32>(); // pretty sure this is invalid
}
Actual results:
I then started a fresh Firefox, and opened the index.html.
The entire Firefox window flashed white for a moment. Then it got back under control and seemingly accepted the shader.
Reloading it repeats the same behavior. If I reload it often enough, I end up getting
Uncaught (in promise) DOMException: WebGPU is disabled by blocklist
Expected results:
It should have reject the shader.
And Firefox definitely shouldn't have flashed white.
| Reporter | ||
Comment 1•2 months ago
|
||
Updated•2 months ago
|
Comment 2•2 months ago
|
||
Comment 3•2 months ago
|
||
This doesn't reproduce for me on macOS, but it does for Windows. Looking at the crash that's taking down the GPU process on Windows (which causes the symptoms you're noting with the screen blanking out), it seems that there's some validation not being done by our shader compiler for this problem. Yikes!
Filed wgpu#8442, since this is reproducible upstream using naga-cli.
Updated•2 months ago
|
| Reporter | ||
Updated•2 months ago
|
Comment 5•2 months ago
|
||
wgpu#8442 has been prioritized as P1 and assigned to me, so I'll update here accordingly.
Updated•2 months ago
|
Updated•1 month ago
|
Description
•