Closed Bug 600593 Opened 14 years ago Closed 14 years ago

optimize atomization w.r.t. new compartment code

Categories

(Core :: JavaScript Engine, defect)

1.9.2 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gal, Assigned: igor)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #600173 +++

See bug 558861 comment 76
No longer blocks: 558861
blocking2.0: ? → ---
Attached patch patch (obsolete) (deleted) — Splinter Review
Assignee: general → igor
The current code might not take advantage of ATOM_NOCOPY in all cases. This patch will fix that.
Attached patch v2 (deleted) — Splinter Review
This fixes the wrongful unlocking and adds better comments. Note even with that the patch has passed the try server.
Attachment #479435 - Attachment is obsolete: true
Attachment #479453 - Flags: review?(anygregor)
(In reply to comment #3)
> Created attachment 479453 [details] [diff] [review]
> v2
> 
> This fixes the wrongful unlocking and adds better comments. Note even with that
> the patch has passed the try server.

Well it's a race condition...
The patch passes the try server.
The patch contains a race condition which will lead to data corruption and crashes. Why are we even discussing this? Please look at the code. You cannot allocate from the default compartment without holding the atom state lock. Period. There is no allocation locking any more and multiple threads access the free list _of the default compartment_ (only).
(In reply to comment #6)
> The patch contains a race condition which will lead to data corruption and
> crashes.

The new version fixes that - see the comment 3.
Attachment #479453 - Flags: review?(anygregor) → review+
Ok, lets dup my bug against this one then and land it (or invalidate the other, either way).
http://hg.mozilla.org/tracemonkey/rev/d425cdb7d074
Whiteboard: fixed-in-tracemonkey
No longer depends on: 600173
http://hg.mozilla.org/mozilla-central/rev/d425cdb7d074
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: