Closed
Bug 643829
Opened 14 years ago
Closed 14 years ago
TI: Incorrect results with compiled zlib
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: azakai, Assigned: jandem)
References
Details
Attachments
(3 files, 2 obsolete files)
The attachment is zlib compiled to JavaScript (two versions - one with optimizations, one without). Running it in jaegermonkey with -m gives incorrect results (an error in one version, an infinite loop in the other). The output without -m is valid (it does some zlib automatic tests and says they passed). This is similar and perhaps related to bug 643635.
Assignee | ||
Comment 1•14 years ago
|
||
This should print "undefined" and then 0-29. With -m -a it prints nothing. With -m it prints about 16 lines until it enters JM. (FWIW I hacked the interpreter to replace expressions with their result. Works quite well to automatically reduce the last ~200 lines. We still need a syntax-based reducer to remove superfluous block statements..)
Assignee | ||
Comment 2•14 years ago
|
||
The lhs register was clobbered in jsop_relational_int. With this patch zlib works perfectly with all combinations of -m, -a and -n: ./js -m -a zlib.js zlib version 1.2.5 = 4688, compile flags = 85 uncompress(): hello, hello! inflate(): hello, hello! large_inflate(): OK after inflateSync(): hello, hello! inflate with dictionary: hello, hello!
Assignee: general → jandemooij
Status: NEW → ASSIGNED
Attachment #521765 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 3•14 years ago
|
||
This also pins lhs in the "target" case.
Attachment #521765 -
Attachment is obsolete: true
Attachment #521765 -
Flags: review?(bhackett1024)
Attachment #521771 -
Flags: review?(bhackett1024)
Comment 4•14 years ago
|
||
Oops. jsop_equality has the same problem in the obj == obj case, do you mind fixing that too?
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #521771 -
Attachment is obsolete: true
Attachment #521771 -
Flags: review?(bhackett1024)
Attachment #521902 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 6•14 years ago
|
||
I considered moving the regalloc outside the |if| but it added more complexity and I think this is safer considering the fixDoubleTypes/syncForBranch in the target case. Let me know if you think it's safe or better to move it.
Assignee | ||
Comment 7•14 years ago
|
||
Never mind, syncForBranch shuffles registers so we have to do it this way.
Updated•14 years ago
|
Attachment #521902 -
Flags: review?(bhackett1024) → review+
Comment 8•14 years ago
|
||
http://hg.mozilla.org/projects/jaegermonkey/rev/3d7188751917
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•14 years ago
|
||
The 1_1 version in the attached archive segfaults on latest jaegermonkey with |-m -n| (while |-m| is ok).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 10•14 years ago
|
||
The loop analysis added yesterday with the bounds hoisting broke on triply-nested loops with 'continue' statements going to the outermost loop. This WFM now with -m -n. http://hg.mozilla.org/projects/jaegermonkey/rev/6474999c14c6
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•