Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9effe61c252b9beab0dc19e260764c711f303312
      
https://github.com/WebKit/WebKit/commit/9effe61c252b9beab0dc19e260764c711f303312
  Author: Mike Wyrzykowski <[email protected]>
  Date:   2025-04-07 (Mon, 07 Apr 2025)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/fuzz-291181-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-291181-reduced-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-291181-reduced.html
    A LayoutTests/fast/webgpu/nocrash/fuzz-291181.html
    M Source/WebGPU/WebGPU/RenderBundleEncoder.mm
    M Source/WebGPU/WebGPU/RenderPipeline.mm

  Log Message:
  -----------
  [WebGPU] Nullptr crash in RenderBundleEncoder when device is invalid
https://bugs.webkit.org/show_bug.cgi?id=291181
rdar://148709778

Reviewed by Cameron McCormack.

We were allowing encoding of commands when the device was nil, leading
to a nullptr crash.

It is invalid to encode commands on an invalid device, so add this condition
to RenderBundleEncoder::validToEncodeCommand.

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

* Source/WebGPU/WebGPU/RenderBundleEncoder.mm:
(WebGPU::RenderBundleEncoder::validToEncodeCommand const):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::RenderPipeline::recomputeLastStrideAsStride const):
Add release assertion, as this should never be called on a nil device.

* LayoutTests/fast/webgpu/nocrash/fuzz-291181-reduced-expected.txt: Added.
* LayoutTests/fast/webgpu/nocrash/fuzz-291181-reduced.html: Added.
Reduced regression test.

Canonical link: https://commits.webkit.org/293376@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to