Closed
Bug 561366
Opened 15 years ago
Closed 15 years ago
Only capture one ScopeTypeChain for every traits
Categories
(Tamarin Graveyard :: Verifier, defect, P3)
Tamarin Graveyard
Verifier
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: edwsmith, Assigned: edwsmith)
References
Details
(Whiteboard: has-patch)
Attachments
(3 obsolete files)
It is possible for OP_newclass to reference the same class twice, so we need to only capture the scope chain once and verify its compatible, like we do for OP_newfunction.
Assignee | ||
Updated•15 years ago
|
Assignee | ||
Comment 1•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
Priority: -- → P3
Target Milestone: --- → flash10.2
Comment 2•15 years ago
|
||
Comment on attachment 441045 [details] [diff] [review]
Avoid capturing duplicate scope chains, fail if any are different.
This looks fine, but where are we seeing this and what is the symptom being fixed?
Attachment #441045 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 3•15 years ago
|
||
Ran into it last year in the jit cache work (bug 486699) and last night working on OSR (539094), both of which run the verifier more than once on the same function. But, its also a potential problem if OP_newclass<N> shows up more than once in a single ABC, just like we've dealt with for OP_newfunction.
We need a test case that does precisely that (tests what happens with OP_newclass<N> being encountered more than once). testing repeated verifier runs isn't possible yet.
Assignee | ||
Updated•15 years ago
|
Whiteboard: has-patch
Assignee | ||
Updated•15 years ago
|
Summary: Verify that each duplicate OP_newclass for the same class captures a compatible ScopeTypeChain → Only capture one ScopeTypeChain for every traits
Assignee | ||
Comment 4•15 years ago
|
||
Widening the scope of the bug; a similar problem exists for OP_newactivation. Encountering this bytecode more than once causes more than one identical ScopeTypeChain to be captured.
The problem is more benign in this case; the opcode does not specify a method, so the scopes will always match. The extra ones are just garbage, but still create problems if the verifier's side effects are executed twice as a result of lazy jit invocation.
Also note that for OP_newactivation, creating and discarding extra scope chains creates unnecessary GC pressure. This happens in any method with an activation scope since every instruction is visited at least twice during verify/jit.
Assignee | ||
Comment 5•15 years ago
|
||
only requesting feedback, because:
* patch needs rebasing to tip
* scope-capture work should move to ScopeWriter
This patch adds a hasScope() convenience function to ScopeOrTraits, and removes resolveActivationScope since it will be refactored within the verifier.
Attachment #441673 -
Flags: feedback?(stejohns)
Comment 6•15 years ago
|
||
Comment on attachment 441673 [details] [diff] [review]
Only capture activation traits the first time we see OP_newactivation
No red flags here.
Attachment #441673 -
Flags: feedback?(stejohns) → feedback+
Assignee | ||
Comment 7•15 years ago
|
||
Comment on attachment 441045 [details] [diff] [review]
Avoid capturing duplicate scope chains, fail if any are different.
OP_newclass fix pushed
http://hg.mozilla.org/tamarin-redux/rev/9dc6bf9db472
Attachment #441045 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Component: Virtual Machine → Verifier
QA Contact: vm → verifier
Assignee | ||
Comment 8•15 years ago
|
||
Changes since last patch:
* rebased
* factored code into ScopeWriter
* leave activationTraits->resolveSignatures(toplevel) call in the main verify block, where it will be invoked unconditionally when we see OP_newactivation in phase 1. This matches existing behavior; I don't intend to change the point where resolveSignatures is called.
Attachment #441673 -
Attachment is obsolete: true
Attachment #451055 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #451055 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 9•15 years ago
|
||
Comment on attachment 451055 [details] [diff] [review]
(v2) Only capture activation traits once, the first time a method is verified
TR: http://hg.mozilla.org/tamarin-redux/rev/bfcef5ed94df
Attachment #451055 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Flags: flashplayer-bug+
You need to log in
before you can comment on or make changes to this bug.
Description
•