Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 33392c4e138505df581d302bdb27c28d5ce907aa
      
https://github.com/WebKit/WebKit/commit/33392c4e138505df581d302bdb27c28d5ce907aa
  Author: Tadeu Zagallo <tzaga...@apple.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M Source/WebGPU/WGSL/AttributeValidator.cpp
    M Source/WebGPU/WGSL/tests/invalid/attribute-validation.wgsl

  Log Message:
  -----------
  [WGSL] Crash in attribute validation when reading size of struct member
https://bugs.webkit.org/show_bug.cgi?id=268390
rdar://121527891

Reviewed by Mike Wyrzykowski.

The AttributeValidator also computes the size of structs, since their sizes can
be affected by @size and @alignment attributes. However, we skip computing the
size if we already encountered any errors, as they might be related to either
@size or @alignment attributes which would affect the result. Because of that,
we should not call Type::size, since the type might be a struct, which would
not have had its size computed.

* Source/WebGPU/WGSL/AttributeValidator.cpp:
(WGSL::AttributeValidator::visit):
* Source/WebGPU/WGSL/tests/invalid/attribute-validation.wgsl:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to