[webkit-changes] [WebKit/WebKit] f95652: [WASM] Check subtyping in both directions for muta...

David Degazio noreply at github.com
Fri Aug 23 16:48:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f95652711d7e02dc8fb2005baf8dd36c1239e2e3
      https://github.com/WebKit/WebKit/commit/f95652711d7e02dc8fb2005baf8dd36c1239e2e3
  Author: David Degazio <d_degazio at apple.com>
  Date:   2024-08-23 (Fri, 23 Aug 2024)

  Changed paths:
    M JSTests/wasm/gc/linking.js
    M Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp

  Log Message:
  -----------
  [WASM] Check subtyping in both directions for mutable globals and tables
https://bugs.webkit.org/show_bug.cgi?id=278497
rdar://problem/134450707

Reviewed by Keith Miller and Yijia Huang.

Replaces our existing typechecking for imported mutable globals and tables to
check subtyping both ways. This ensures the type we import a global value or
table as is not a supertype of the imported value's innate type - we don't want
to be able to import a non-nullable (ref func) as a nullable (ref null func)
and violate the original type by assigning it to a null value.

* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::initializeImports):

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