Closed Bug 525878 Opened 15 years ago Closed 15 years ago

The lirasm "call1" test fails on ARM.

Categories

(Core :: JavaScript Engine, defect)

ARM
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta5-fixed

People

(Reporter: jbramley, Assigned: jbramley)

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey)

Attachments

(1 file)

==== I'm using lirasm from nanojit-central. ====

The lirasm.cpp test utility prints the output like this:

cout << "Output is: " << i->second.rint() << endl;

The rint() method appears to actually calculate the result. On x86, this works, but on ARM the result is evaluated (and thus "ABC" is printed) _before_ the "Output is: " string is printed, so the output gets messed up.

The attached patch fixes this.

(I still get three failures, but I'll open another bug for them as it's a separate issue.)
Attachment #409695 - Flags: review?(graydon)
The other failures are already covered by bug 525412.
Comment on attachment 409695 [details] [diff] [review]
Fix lirasm.cpp so that it evaluates rint() and rfloat() before it starts to print the result.

Hilarious. iostreams kicks us in the shins again. Thanks.
Attachment #409695 - Flags: review?(graydon) → review+
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tracemonkey
(In reply to comment #2)
> (From update of attachment 409695 [details] [diff] [review])
> Hilarious. iostreams kicks us in the shins again. Thanks.

It would seem that the non-determinism allowed by C sequence points is to blame, not our beleaguered type safe friend iostreams.  The same flexibility to evaluate argument expressions would have been present if printf was used.
http://hg.mozilla.org/mozilla-central/rev/651db313edf2
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
These bugs landed after b4 was cut. Moving flag out.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: