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•5 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•5 years ago
|
Comment 3•5 years ago
|
||
| bugherder | ||
Description
•