Closed Bug 546435 Opened 14 years ago Closed 14 years ago

Verifier and jit-Debugger don't always agree about variable types

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
flash10.1

People

(Reporter: edwsmith, Assigned: edwsmith)

References

Details

(Whiteboard: verifier-cleanup)

Attachments

(1 file, 1 obsolete file)

The basic flow through the code is:

1. verifier models the types of an operator
2. verifier calls CodeWriter interface, sometimes passing type information
3. jit genertates code, and saves result Traits* for debugger to use later
4. verifier calls FrameState.setType with the modelled result type

The types from step (3) and (4) sometimes are different, which will cause the debugger to be confusing, best, or possibly crash.  Moreover, sometimes the jit must recompute or guess a type and assert it's guess, because information in the verifier is not passed through the codeWriter interface in step 2.
Blocks: 413522
The jit has class DebuggerCheck for sanity checking that the expressions in each variable slot have compatible LIR instruction types with the saved Traits*, but it runs in step 3 before the verifier has called FrameState.setType().
Assignee: nobody → edwsmith
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Flags: flashplayer-qrb+
Priority: -- → P2
Whiteboard: verifier-cleanup
Target Milestone: Future → flash10.1
Pass verifier type information to CodeWriter so the jit can use it directly instead of second guessing.

In a handful of cases, the JIT was not marking the result of an opcode with the same type as the verifier.  This will cause confusion and crashes when debugging, at best.

This patch is slightly bigger than necessary, for consistency's sake: several additional opcodes were updated to pass type to CodeWriter, even though the jit already was using the correct type.
Attachment #428608 - Flags: review?(rreitmai)
Attachment #427241 - Attachment is obsolete: true
Attachment #428608 - Flags: review?(rreitmai) → review+
pushed
http://hg.mozilla.org/tamarin-redux/rev/431a693e1689
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
verified in argo
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: