[webkit-changes] [WebKit/WebKit] 7dc1af: [WGSL] Crash when failing to type check addressSpa...

Tadeu Zagallo noreply at github.com
Tue Jan 30 06:47:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7dc1af69d5f28486dc2dd697670eb5d90f7c6214
      https://github.com/WebKit/WebKit/commit/7dc1af69d5f28486dc2dd697670eb5d90f7c6214
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M Source/WebGPU/WGSL/TypeCheck.cpp

  Log Message:
  -----------
  [WGSL] Crash when failing to type check addressSpace and similar enums
https://bugs.webkit.org/show_bug.cgi?id=268308
rdar://121527219

Reviewed by Mike Wyrzykowski.

The code assumes that if we successfully unify the type of the expression with
the addressSpace enum type, then the node must be an IdentifierExpression. This
is valid most of the time, except the type is bottom, then the expression might
be anything since bottom with unifies with all types. To fix that we explicitly
check if the type is bottom.

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::texelFormat):
(WGSL::TypeChecker::accessMode):
(WGSL::TypeChecker::addressSpace):

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




More information about the webkit-changes mailing list