Closed
Bug 544874
Opened 16 years ago
Closed 16 years ago
Jit incorrectly marks result of OP_urshift as int instead of uint
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect, P2)
Tamarin Graveyard
Baseline JIT (CodegenLIR)
Tracking
(Not tracked)
VERIFIED
FIXED
flash10.1
People
(Reporter: edwsmith, Assigned: edwsmith)
References
Details
Attachments
(1 file)
373 bytes,
patch
|
rreitmai
:
review+
|
Details | Diff | Splinter Review |
The verifier corrects it later when it calls FrameState::setType(), but it's still a bug because the debugger will see the wrong type when debugging JIT'd code, and when the JIT is decoupled from the verifier, it will simply be wrong.
jit:
case OP_urshift:
emit(state, opcode, 0, 0, INT_TYPE); <-- should be UINT_TYPE
break;
verifier:
case OP_urshift:
checkStack(2,1);
emitCoerce(INT_TYPE, sp-1); <-- should be UINT_TYPE, but benign
emitCoerce(INT_TYPE, sp);
coder->write(state, pc, opcode);
state->pop_push(2, UINT_TYPE); <-- already correct
break;
Assignee | ||
Comment 1•16 years ago
|
||
Assignee: nobody → edwsmith
Attachment #425798 -
Flags: review?(rreitmai)
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → flash10.1
Updated•16 years ago
|
Attachment #425798 -
Flags: review?(rreitmai) → review+
Assignee | ||
Comment 2•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 3•15 years ago
|
||
without the patch applied, it should be possible to make a test that detects the uint/int difference for OP_urshift, by doing (x >>> 0) where x is some value with its high bit set. if you stop in the debugger after the urshift, and inspect the value (when the method is jitted), the bug is you'll see a negative number when you should see a large positive number. tricky but doable.
Flags: in-testsuite?
Comment 4•15 years ago
|
||
Since a debugger testcase is not possible, can we create an abcasm testcase? I was unable to create a testcase with limited trying on my part.
Assignee | ||
Comment 5•15 years ago
|
||
The debugger was the only thing potentially exposed to this bug. I beleive we have asserts in place now that adequately cover the potential for a future problem, so i'm clearing the in-testsuite flag.
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•