Closed
Bug 593431
Opened 14 years ago
Closed 6 years ago
Thread safety hazards in Traits
Categories
(Tamarin Graveyard :: Verifier, defect)
Tamarin Graveyard
Verifier
Tracking
(Not tracked)
RESOLVED
WONTFIX
Future
People
(Reporter: edwsmith, Unassigned)
References
Details
(Whiteboard: loose-end)
Attachments
(1 file)
7.44 KB,
patch
|
Details | Diff | Splinter Review |
Each instance of Traits has a 1-bit wide commonBase field, which is just a flag used during Verifier::findCommonBase().
With upcoming background compilation, that single bit is not threadsafe. It isn't worth locking around it; findCommonBase() should be rewritten so that it doesn't mutate the Traits objects being analyzed.
Reporter | ||
Comment 1•14 years ago
|
||
m_supertype_cache and m_supertype_neg_cache are mutated by suptypeof(), so might not be threadsafe.
This fact might be useful for a two-finger walk in Verifier::findCommonBase(): If the type is a normal class (not an interface) and its inheritance depth is < MAX_PRIMARY_SUPERTYPE, then we can compute its inheritance depth without a tree walk, from m_supertype_offset.
Summary: Traits::commonBase is not threadsafe → Thread safety hazards in Traits
Comment 2•14 years ago
|
||
(In reply to comment #0)
> Each instance of Traits has a 1-bit wide commonBase field, which is just a flag
> used during Verifier::findCommonBase().
>
> With upcoming background compilation, that single bit is not threadsafe. It
> isn't worth locking around it; findCommonBase() should be rewritten so that it
> doesn't mutate the Traits objects being analyzed.
I've already included a thread-safe version of findCommonBase in the main patch of bug 600723.
See section 5, 'Thread-Safety' in the design notes on comment 3 (https://bugzilla.mozilla.org/show_bug.cgi?id=600723#c3)
Taking another look though, I might not be handling interfaces correctly. Will take a look and report back...
Comment 3•14 years ago
|
||
(In reply to comment #2)
>
> Taking another look though, I might not be handling interfaces correctly. Will
> take a look and report back...
I wasn't doing this correctly.
Latest patch of bug 600723 contains a fix.
Updated•14 years ago
|
Assignee: nobody → siwilkin
Flags: flashplayer-qrb+
Updated•14 years ago
|
Assignee: siwilkin → edwsmith
Comment 4•14 years ago
|
||
Factored the thread-safe implementation of Verifier::findCommonBase from bug 600723 into this patch.
Reporter | ||
Updated•13 years ago
|
Whiteboard: loose-end
Reporter | ||
Updated•13 years ago
|
Assignee: edwsmith → nobody
Comment 5•6 years ago
|
||
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 6•6 years ago
|
||
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in
before you can comment on or make changes to this bug.
Description
•