Use placement new to forward cells to work around undefined behaviour
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(3 files)
Use of RelocationOverlay::next_ to hold a linked list pointer is undefined behaviour because the underlying type of that location is something else. We can get around this by using placement new to start a new lifetime for the cell memory as a RelocationOverlay before using it as such. (I was surprised to discover that destruction of the original contents of the memory is not required first).
Assignee | ||
Comment 1•5 years ago
|
||
Depends on D69524
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D69575
Assignee | ||
Comment 3•5 years ago
|
||
I wanted to assert that the most derived type of all GC things had standard layout type; sadly this was not true. The restrictions are quite strong, and I don't think this is realistic. However we can assert that the base GC thing type meets the restrictions with one minor change and I think that's most of the way there.
Depends on D69575
Comment 6•5 years ago
|
||
Backed out 3 changesets (Bug 1627248) for causing bustages in src/js/src/gc/GC.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/a5d3f290d892c7d62db74d1a18433f1f9025d146
Failure log:
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ae8829b46a23
https://hg.mozilla.org/mozilla-central/rev/6b6f3e10c9a4
https://hg.mozilla.org/mozilla-central/rev/5bbd86857de9
Assignee | ||
Updated•5 years ago
|
Description
•