JM: Multithreading safety

RESOLVED DUPLICATE of bug 551341

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 551341
8 years ago
8 years ago

People

(Reporter: dmandelin, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
A script can potentially be shared across multiple threads. This presents hazards--for example, patching a PIC on one thread while another thread is running the same native code would be unsafe (very, very unsafe). We need to ensure, one way or another, than only one thread can be running/patching a given native code script at a time.

Comment 1

8 years ago
Dare I ask whether you can just ignore this problem and start from scratch on each thread (basically making all the codegen thread-local)?
(Reporter)

Comment 2

8 years ago
(In reply to comment #1)
> Dare I ask whether you can just ignore this problem and start from scratch on
> each thread (basically making all the codegen thread-local)?

We should probably dup this bug over to bug 551341, which I had forgotten about. If I understand that proposal right, it means fixing a script to a given JSThread, and the script would run natively only on that thread--otherwise it would go to the interpreter. Any ideas for simplifying this further would be great.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 551341
You need to log in before you can comment on or make changes to this bug.