[webkit-changes] [WebKit/WebKit] 7eb2a7: [WebGPU] Ensure infinite loops will always termina...

mwyrzykowski noreply at github.com
Tue Feb 11 10:35:28 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7eb2a7eaa92aa9486e0a2f6ae0aa03eeae5f829c
      https://github.com/WebKit/WebKit/commit/7eb2a7eaa92aa9486e0a2f6ae0aa03eeae5f829c
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2025-02-11 (Tue, 11 Feb 2025)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/fuzz-287444-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-287444.html
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp

  Log Message:
  -----------
  [WebGPU] Ensure infinite loops will always terminate at some point
https://bugs.webkit.org/show_bug.cgi?id=287444
rdar://144542249

Reviewed by Tadeu Zagallo.

Setting a volatile variable to true inside a loop does not seem
to be sufficient to prevent optimizations from MTLCompiler service.

Instead, terminate after 2^32 - 1 iterations of any loop. More likely,
the loop will get terminated due to the fragment execution taking
too long instead.

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

* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::visit):
Switch from bool -> uint32_t

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list