Closed Bug 1890670 Opened 5 months ago Closed 5 months ago

Assertion failure: markColor() >= targetColor using symbols as weakmap keys

Categories

(Core :: JavaScript: GC, defect, P3)

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- disabled
firefox125 --- disabled
firefox126 --- disabled
firefox127 --- fixed

People

(Reporter: sfink, Assigned: jonco)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I was reviewing https://phabricator.services.mozilla.com/D194973 and couldn't see where Symbols were handled. I tried this test, and it crashed with an assertion failure:

% $JS --enable-symbols-as-weakmap-keys -e 'wm = new WeakMap(); s = Symbol(); wm.set(s, new WeakMap()); ss = Symbol(); wm.get(s).set(this, ss); wm2 = new WeakMap(); wm2.set(ss, "test"); ss = null; gc()' 
Assertion failure: markColor() >= targetColor, at /home/sfink/src/mozilla4/js/src/gc/Marking.cpp:751

I don't know that this is the same thing, but it seems like at least ImplicitEdgeHolderType<Symbol> should be fixed, and processMarkStackTop seems like it should handle them too.

Blocks: 1710433

Also Bug 1876687 has similar assertion failure.

Well this is unfortunate.

Assignee: nobody → jcoppeard
Keywords: regression
Regressed by: 1828144

Set release status flags based on info from the regressing bug 1828144

Allowing symbols as weakmap keys means that we have to trace implicit edges
generated by these. The patch adds JS::Symbol to the types we do this for.

What's the user-facing impact of this bug?

Flags: needinfo?(jcoppeard)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #5)

What's the user-facing impact of this bug?

The symbols-as-weakmap-keys feature is nightly-only and behind a pref, so does not affect release builds at all. Which is a good thing given this bug.

Flags: needinfo?(jcoppeard)
Severity: -- → S3
Priority: -- → P3

Set release status flags based on info from the regressing bug 1828144

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Regressions: 1894216
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: