JSClass pointers are stored in the first word of GC cells but don't respect the required alignment
Categories
(Core :: JavaScript: GC, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
Details
Attachments
(1 file)
We'd like to have an invariant whereby anything that's stored in the first word of a GC cell has the bottom three bits clear so these can be used by the GC.
Currently JSClass pointers violate this (it appears to have four byte alignment on 32 bit platforms).
This doesn't cause problems at the moment because the GC only uses bits one and two for nursery cells and JSClass pointers are only used in cells that are always tenured, but we'd like to enforce this invariant for simplicity and general sanity.
Assignee | ||
Comment 1•5 years ago
|
||
This defines a constant for the number of reserved bits in a public header and does some tidying up.
Assignee | ||
Comment 2•5 years ago
|
||
BTW I tried to add MOZ_STATIC_CLASS to the JSClass definition but I got compile errors from rust binding jobs whichever way round I put it:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294707383&repo=try&lineNumber=795
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294710997&repo=try&lineNumber=3051
Comment 4•5 years ago
|
||
bugherder |
Description
•