Stop allowing JS helper thread access to CHECK_THREAD APIs
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
Details
Attachments
(1 file)
For JSAPI entry points, we often AssertHeapIsIdle()
and CHECK_THREAD()
. This is a bit of a footgun on helper-threads (eg off-thread parse) since the heap my intermittently be not idle, but CHECK_THREAD has a blanket allow for helper-threads.
To prevent intermittent issues from being introduced, we should disallow helper-threads for APIs that CHECK_THREAD
. Currently the only violation is Atomize/AtomizeChars which I propose just removing the CHECK_THREAD
from for now.
Assignee | ||
Comment 1•4 years ago
|
||
SpiderMonkey APIs often use CHECK_THREAD and AssertHeapIsIdle, but this can
be a footgun when they are called from helper-threads since often nothing
ensures the heap is idle. Instead, this patch updates the CHECK_THREAD assert
to disallow helper-thread access to prevent misuses. The checks in Atomize
and AtomizeChars are removed since those are (currently) allowed on helper
threads.
Updated•4 years ago
|
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4c6aeca6e2f Stop allowing JS helper thread access to CHECK_THREAD APIs r=jandem
Comment 3•4 years ago
|
||
bugherder |
Description
•