[webkit-changes] [WebKit/WebKit] 01ece4: [WGSL] Struct padding calculation can overflow

Tadeu Zagallo noreply at github.com
Wed Jan 15 10:53:37 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 01ece4a19daeb1fa6b3657f37b860538e073cdb3
      https://github.com/WebKit/WebKit/commit/01ece4a19daeb1fa6b3657f37b860538e073cdb3
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2025-01-15 (Wed, 15 Jan 2025)

  Changed paths:
    M Source/WebGPU/WGSL/AttributeValidator.cpp
    A Source/WebGPU/WGSL/tests/invalid/large-struct.wgsl

  Log Message:
  -----------
  [WGSL] Struct padding calculation can overflow
https://bugs.webkit.org/show_bug.cgi?id=285842
rdar://142550450

Reviewed by Mike Wyrzykowski.

When size overflowed it was incorrectly set to the previous size, instead of
UINT_MAX, which made it possible to overflow while calculating padding since
size could be smaller than offset.

* Source/WebGPU/WGSL/AttributeValidator.cpp:
(WGSL::AttributeValidator::visit):
* Source/WebGPU/WGSL/tests/invalid/large-struct.wgsl: Added.

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