[webkit-changes] [WebKit/WebKit] be0e71: [WGSL] Attribute validator should not access Type:...

Tadeu Zagallo noreply at github.com
Fri Sep 27 02:35:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: be0e71ac63cf08348ea4cdcdbc55cc67892dff00
      https://github.com/WebKit/WebKit/commit/be0e71ac63cf08348ea4cdcdbc55cc67892dff00
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

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

  Log Message:
  -----------
  [WGSL] Attribute validator should not access Type::alignment
https://bugs.webkit.org/show_bug.cgi?id=280405
rdar://136222279

Reviewed by Mike Wyrzykowski.

Type::alignment can access AST::Structure::m_alignment, which is populated by the
AttributeValidator itself, so it's only safe to access it when no validation errors
have occurred so far. Otherwise, there's a chance we might be accessing the alignment
(or size) of a struct that contained an error, and therefore its alignment/size
wouldn't have been computed.

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

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