Closed
Bug 674506
Opened 13 years ago
Closed 13 years ago
IonMonkey: Assertion failure: *from != *to, at CodeGenerator-x86-shared.cpp:213
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: adrake, Assigned: dvander)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
With greedy allocator enabled on x86 debug:
[adrake@reappropriated obj32]$ ./js --ion critical.js
Assertion failure: *from != *to, at /home/adrake/moz/ionmonkey/js/src/ion/shared/CodeGenerator-x86-shared.cpp:213
Aborted (core dumped)
Comment 1•13 years ago
|
||
The assertion was caused by a stack -> stack move during phi node move resolution, when both stacks happened to be equal. Patch just doesn't emit a move, and adds an assertion to cause failure closer to point of use.
Attachment #549295 -
Flags: review?(adrake)
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 549295 [details] [diff] [review]
Fix stack -> stack move where stacks are equal.
Review of attachment 549295 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #549295 -
Flags: review?(adrake) → review+
Comment 3•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•13 years ago
|
||
This test case trips the new assert -- seems to be caused by phi resolution as well.
Reporter | ||
Updated•13 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Updated•13 years ago
|
Assignee | ||
Comment 6•13 years ago
|
||
There are two bugs here.
* Greedy allocator relies on block->id() < graph.numBlocks() and this regressed.
* The register assignments to defs was left lying around after processing each
block. We could make this work, clearing it lazily via peeking at |state|, but
that strikes me as error-prone and scary. So now we just clear register
assignments leaving a block, and restore them when merging state.
I also introduced some asserts to catch errors earlier.
Assignee: general → dvander
Attachment #549295 -
Attachment is obsolete: true
Status: REOPENED → ASSIGNED
Attachment #550835 -
Flags: review?(adrake)
Reporter | ||
Comment 7•13 years ago
|
||
Comment on attachment 550835 [details] [diff] [review]
fix
Review of attachment 550835 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/GreedyAllocator.h
@@ +301,5 @@
> RegisterSet allocatableRegs() const {
> return RegisterSet::Intersect(state.free, RegisterSet::Not(disallowed));
> }
> BlockInfo *blockInfo(LBlock *block) {
> + JS_ASSERT(block->mir()->id() < graph.numBlocks());
This should be graph.numBlockIds() for sparse block IDs.
Attachment #550835 -
Flags: review?(adrake) → review+
Assignee | ||
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•