Closed Bug 1386158 Opened 2 years ago Closed 2 years ago

Atom table is not thread-safe

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1381731

People

(Reporter: xidorn, Unassigned)

References

Details

Attachments

(1 file)

The gUnusedAtomCount mechanism is not thread-safe, and there could be race condition when there is concurrency.

This causes the two intermittents.
Attached patch patch of testSplinter Review
This patch adds a gtest which makes this issue easy to reproduce.

Apply the patch, and run
> ./mach gtest 'Atoms.ConcurrentAccessing'
it should crash pretty reliably with "gUnusedAtomCount > 0".
with "Assertion failure: gUnusedAtomCount > 0", I mean.
Stylo uses atoms heavily, concurrently. So this really should block stylo-release.
OK, heycam has some idea in bug 1381731.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1381731
You need to log in before you can comment on or make changes to this bug.