Skip to content

Commit

Permalink
[WebGPU] RenderBundleEncoder::endCurrentICB may assert in ASAN builds…
Browse files Browse the repository at this point in the history
… on invalid bundle encoder

https://bugs.webkit.org/show_bug.cgi?id=274271
<radar://128064942>

Reviewed by Dan Glastonbury.

There is an ASAN assert in Vector::grow(sz) to ensure sz >= the current size,
which will not be true when replaying commands from an invalid RenderBundleEncoder.

But we shouldn't replay commands from an invalid RenderBundleEncoder in the first place,
so return early if the encoder is invalid.

* LayoutTests/fast/webgpu/fuzz-274271-expected.txt: Added.
* LayoutTests/fast/webgpu/fuzz-274271.html: Added.
* LayoutTests/TestExpectations:
Add regression test.

* Source/WebGPU/WebGPU/RenderBundleEncoder.h:
(WebGPU::RenderBundleEncoder::isValid const): Deleted.
* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::endCurrentICB):
(WebGPU::RenderBundleEncoder::isValid const):
(WebGPU::RenderBundleEncoder::replayCommands):

Canonical link: https://commits.webkit.org/278997@main
  • Loading branch information
mwyrzykowski committed May 20, 2024
1 parent 3e3d088 commit 21e320d
Show file tree
Hide file tree
Showing 5 changed files with 24,971 additions and 3 deletions.
2 changes: 2 additions & 0 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -2121,6 +2121,8 @@ webkit.org/b/139639 [ Debug ] cssom/non-subpixel-scroll-top-left-values.html [ S
[ Release ] fast/webgpu/fuzz-274270.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-274161.html [ Skip ]
[ Release ] fast/webgpu/fuzz-274161.html [ Pass Failure Timeout ]
[ Debug ] fast/webgpu/fuzz-274271.html [ Skip ]
[ Release ] fast/webgpu/fuzz-274271.html [ Pass Failure Timeout ]

# Imported W3C HTML/DOM ref tests that are failing.
imported/w3c/web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html [ ImageOnlyFailure ]
Expand Down
Loading

0 comments on commit 21e320d

Please sign in to comment.