Investigate issues with addWeakRefObservers/addRecordObservers and transplant JS shell coverage
Categories
(Core :: JavaScript: GC, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox150 | --- | unaffected |
| firefox151 | --- | wontfix |
| firefox152 | --- | fixed |
People
(Reporter: jandem, Assigned: jonco)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, sec-audit, Whiteboard: [adv-main152-])
Attachments
(2 external files)
Audits found two related issues:
- In
addWeakRefObserversandaddRecordObserverswe can iloop in non-debug builds because the loops calllist.getFirst()instead oflist.popFirst(). transplantableObject()in the shell always usesJS_CloneObjectto create a fresh target. So the merge path — where the transplant target already has WeakRef/FR observers — is structurally unreachable from the shell.
We should figure out which transplant cases exist in the browser that currently can't be tested in the JS shell. We should then try to make those testable so that we can write shell tests for (1).
| Reporter | ||
Comment 1•6 months ago
|
||
I looked a bit into our JS shell coverage of the transplant cases and most of the code can be exercised in the shell.
It's possible the merge paths in (1) are dead but I'm not completely sure.
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 2•6 months ago
|
||
This code was added in bug 2032512.
Comment 3•6 months ago
|
||
Set release status flags based on info from the regressing bug 2032512
| Assignee | ||
Comment 4•6 months ago
|
||
Rather than having a separate fast path when there are no previous observers,
add an append method to ObserverList and call it in all cases. I check that our
existing tests hit this.
Updated•6 months ago
|
| Assignee | ||
Comment 5•6 months ago
|
||
This adds some basic tests for the ObserverList data structure. This is a
linked list of weakly held ObserverListObjects with the links held in object
slots.
Updated•6 months ago
|
Comment 8•6 months ago
|
||
Backed out for causing hazard failures @testObserverList.cpp
| Assignee | ||
Updated•6 months ago
|
Comment 10•6 months ago
|
||
https://hg-edge.mozilla.org/mozilla-central/rev/9e40975bb539
https://hg-edge.mozilla.org/mozilla-central/rev/bed8aefb4b76
Updated•6 months ago
|
Updated•5 months ago
|
Updated•1 month ago
|
Description
•