[webkit-changes] [WebKit/WebKit] 7ce400: [Wasm-GC] Initialize all ref-typed locals to JS nu...

Tim Chevalier noreply at github.com
Thu Feb 16 11:56:54 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ce4006e3d05bbd0d2215012b3887dba805e3e07
      https://github.com/WebKit/WebKit/commit/7ce4006e3d05bbd0d2215012b3887dba805e3e07
  Author: Tim Chevalier <tjc at igalia.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    A JSTests/wasm/gc/bug252299.js
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp

  Log Message:
  -----------
  [Wasm-GC] Initialize all ref-typed locals to JS null value
https://bugs.webkit.org/show_bug.cgi?id=252299

Reviewed by Yusuke Suzuki and Tadeu Zagallo.

`LLIntGenerator::addLocal()` was only initializing uninitialized locals
to the JS null value if they were typed `Funcref` or `Externref`,
meaning that array- or struct-typed locals would be initialized to 0.
This caused a segfault if they were accessed with set/get operations.
Changed `addLocal()` to initialize all ref-typed locals to null.

* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::addLocal):

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




More information about the webkit-changes mailing list