Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c7b8419c6ff3be3a4ae2f5246c6327a962c8698
      
https://github.com/WebKit/WebKit/commit/8c7b8419c6ff3be3a4ae2f5246c6327a962c8698
  Author: Tadeu Zagallo <[email protected]>
  Date:   2024-03-01 (Fri, 01 Mar 2024)

  Changed paths:
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/invalid/array.wgsl

  Log Message:
  -----------
  [WGSL] Validate maximum array size
https://bugs.webkit.org/show_bug.cgi?id=270313
rdar://123852286

Reviewed by Mike Wyrzykowski and Alex Christensen.

Fix 2 issues with array sizes:
- the size was being treated as unsigned and only checking for 0, but according
  to the spec the size can also be signed, and we should return an error for
  negative values
- we also need to limit the maximum size of an array. the spec[1] says the 
minimum
  size we must support is 65535 bytes, but for now we just check for 65535 
elements.

[1]: https://www.w3.org/TR/WGSL/#limits

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/invalid/array.wgsl:

Canonical link: https://commits.webkit.org/275557@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