Open
Bug 2057626
Opened 1 month ago
Updated 1 day ago
DLP WASM module should have memory allocation model with guaranteed correct alignment
Categories
(Enterprise Products :: Firefox, defect)
Enterprise Products
Firefox
Tracking
(Not tracked)
NEW
V1
People
(Reporter: jmendez, Unassigned)
References
(Blocks 1 open bug)
Details
As raised in a PR comment, the memory allocation of bytes used in the DLP module only guarantees 1-byte alignment but is used for usize/u32 data structures. From testing and research, this isn't currently a practical concern due to known allocators over-aligning their allocations. But we should change the model to guarantee alignment.
A few possible approaches:
- Create type-specific allocate methods; there are few types and they should stabilize early, so it shouldn't blow up the API
- Update
ca_allocto take an align value and expect the host to pass the correct align value. This could perhaps be paired with an API that lets the host query existing types and their sizes/alignments. - Leave the same API but just always over-align to e.g. 8 bytes.
Summary: DLP WASM module has memory allocation model with guaranteed correct alignment → DLP WASM module should have memory allocation model with guaranteed correct alignment
Also to the extent we cannot enforce byte-compatibility automatically we should document e.g. wasm32 vs wasm64.
Updated•21 days ago
|
Severity: -- → S3
Updated•21 days ago
|
Target Milestone: MVP → V1
You need to log in
before you can comment on or make changes to this bug.
Description
•