[Webkit-unassigned] [Bug 266043] New: [Wasm-GC] Fix missing write barrier in BBQJIT struct.set
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 7 17:02:39 PST 2023
https://bugs.webkit.org/show_bug.cgi?id=266043
Bug ID: 266043
Summary: [Wasm-GC] Fix missing write barrier in BBQJIT
struct.set
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebAssembly
Assignee: webkit-unassigned at lists.webkit.org
Reporter: asumu at igalia.com
The following test crashes in the BBQJIT tier:
```
//@ runWebAssemblySuite("--useWebAssemblyTypedFunctionReferences=true", "--useWebAssemblyGC=true")
import * as assert from "../assert.js";
import { compile, instantiate } from "./wast-wrapper.js";
const m1 = instantiate(`
(module
(type (struct (field i32)))
(type (struct (field (mut (ref null 0)))))
(func (export "f") (result (ref any))
(struct.new 1 (ref.null 0)))
)
`);
const struct = m1.exports.f()
gc();
const m2 = instantiate(`
(module
(type (struct (field i32)))
(type (struct (field (mut (ref null 0)))))
(func (export "g") (param (ref 1))
(struct.set 1 0 (local.get 0) (struct.new 0 (i32.const 42))))
(func (export "h") (param (ref 1)) (result i32)
(struct.get 0 0 (struct.get 1 0 (local.get 0))))
)
`);
m2.exports.g(struct);
edenGC();
assert.equals(m2.exports.h(struct), 42);
```
This is due to a missing write barrier, ensuring that the old object from module m1 has a reference to a new object in module m2 that will be traced.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231208/e9fa722e/attachment.htm>
More information about the webkit-unassigned
mailing list