Document why the atomic instructions are gated on javascript.options.shared_memory
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox89 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
Details
Attachments
(1 file)
Since the atomic instructions are allowed on nonshared memories, the gating could be removed from the instruction decoders without risking opening up for "shared memory" behavior (high-resolution clocks etc). However, there's always the slight risk that executing memory fences on nonshared memories can be used to communicate in some fashion, and it is more consistent to disable these instructions altogether if the option disables shared memory. A little documentation goes a long way here.
Should also check that JS does something reasonable with atomics if the switch is disabled, maybe JS wants a comment too.
| Assignee | ||
Comment 1•5 years ago
|
||
(In reply to Lars T Hansen [:lth] from comment #0)
Should also check that JS does something reasonable with atomics if the switch is disabled, maybe JS wants a comment too.
JS has the same behavior: disabling javascript.options.shared_memory makes the Atomics namespace undefined, hence atomic operations are not available at all if the option is disabled.
| Assignee | ||
Comment 2•5 years ago
|
||
As is the case for JS, when j.o.shared_memory=false we remove the atomic operations
altogether for maximum safety; this just documents that it is not an accident.
Comment 4•5 years ago
|
||
| bugherder | ||
Description
•