[webkit-changes] [WebKit/WebKit] 33392c: [WGSL] Crash in attribute validation when reading ...
Tadeu Zagallo
noreply at github.com
Tue Jan 30 11:02:03 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 33392c4e138505df581d302bdb27c28d5ce907aa
https://github.com/WebKit/WebKit/commit/33392c4e138505df581d302bdb27c28d5ce907aa
Author: Tadeu Zagallo <tzagallo at 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
More information about the webkit-changes
mailing list