Strengthen invariants around access to per-tier information
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | fixed |
People
(Reporter: lth, Assigned: lth)
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1733908 +++
In bug 1733908, it was discovered that some of the invariants around access to Code::tier2_ were not obeyed in certain situations where it was actually but not obviously safe not to do so. We can and should clean this up properly.
| Assignee | ||
Comment 1•4 years ago
|
||
It is an invariant of Code::tier2_ that it is never read without the
atomic Code::hasTier2_ being true.
This invariant is violated in a couple of harmless cases, where code
on the thread that has just written tier2_ (the committing background
thread) will read tier2_ again before the tier-2 code is committed by
hasTier2_ being written.
This patch removes those violations at essentially zero cost.
TODO: I added a protocol here for setTier2 to return a borrowed
pointer to the tier-2 code. But it's possible that the caller of
setTier2 should just extract that pointer from values it already has
in hand. Discuss.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
| bugherder | ||
Description
•