memory.grow is not correctly implemented for custom page sizes
Categories
(Core :: JavaScript: WebAssembly, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox147 | --- | unaffected |
| firefox148 | --- | disabled |
| firefox149 | --- | disabled |
| firefox150 | --- | disabled |
People
(Reporter: bvisness, Assigned: asumu)
References
(Blocks 2 open bugs, Regression)
Details
(Keywords: regression)
Attachments
(3 files)
It seems that memory.grow is not properly supported in the current implementation of custom page sizes. In fact, there seems to be no testing of various memory APIs whatsoever in the current implementation of custom page sizes. I wish we had caught this before but it seems there are some glaring omissions now.
I've attached a test file that exercises memory.grow. Right now this triggers debug asserts related to our memory bookkeeping, seemingly stemming from the fact that the allocation procedures for wasm memory cannot handle deltas that are not aligned to the system page size.
Comment 1•8 months ago
|
||
Set release status flags based on info from the regressing bug 1977854
| Assignee | ||
Comment 2•8 months ago
|
||
Thanks and sorry for the broken code paths here, there was some test coverage from the spec tests but I agree it's not enough. I've looked into the memory.grow issue and have some fixes for it that I'll make into a patch. I'll look over the other memory APIs as well.
Comment 3•7 months ago
|
||
Pref: javascript.options.wasm_custom_page_sizes
Updated•7 months ago
|
Updated•6 months ago
|
| Assignee | ||
Comment 4•6 months ago
|
||
Wasm memories with custom page sizes need to be monitored by the
instance for bounds limit changes like moving growable memories.
| Assignee | ||
Comment 5•6 months ago
|
||
Add an alternate bounds check that checks against the volatile
memory length for shared memories with custom page sizes, whose
bounds limits can't be updated like non-shared memories when shared
between instances.
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•5 months ago
|
Description
•