Closed
Bug 946969
Opened 11 years ago
Closed 11 years ago
Differential Testing: Different output message involving Math.abs and Math.tan
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: gkw, Assigned: dougc)
References
Details
(Keywords: regression, testcase, Whiteboard: [fuzzblocker])
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
dougc
:
review+
|
Details | Diff | Splinter Review |
function f() {
return Math.abs(~(Math.tan()));
}
x = [];
x.push(f());
x.push(f());
print(x);
shows "1,1" without --ion-eager but shows "1,-1" with --ion-eager. Tested on js debug shell on m-c changeset 1426ffa9caf2 on ARM Ubuntu Linux.
My configure flags are:
CC="gcc -mfloat-abi=softfp -B/usr/lib/gcc/arm-linux-gnueabi/4.7" AR=ar CXX="g++ -mfloat-abi=softfp -B/usr/lib/gcc/arm-linux-gnueabi/4.7" sh ./configure --target=arm-linux-gnueabi --enable-optimize --enable-debug --enable-profiling --enable-gczeal --enable-debug-symbols --enable-methodjit --enable-type-inference --disable-tests --enable-more-deterministic --with-ccache --enable-threadsafe <other NSPR options>
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: http://hg.mozilla.org/mozilla-central/rev/348b2ba27515
user: David Caabeiro
date: Mon Jul 15 10:03:14 2013 -0500
summary: Bug 717379, part 1 - Implement the new ES6 math functions. r=jorendorff.
This may have been a bug from whenever ES6 math functions landed in bug 717379. Setting needinfo? from ARM folks.
Flags: needinfo?(mrosenberg)
Flags: needinfo?(dtc-moz)
Assignee | ||
Comment 1•11 years ago
|
||
(In reply to Gary Kwong [:gkw] [:nth10sd] from comment #0)
> function f() {
> return Math.abs(~(Math.tan()));
> }
> x = [];
> x.push(f());
> x.push(f());
> print(x);
>
> shows "1,1" without --ion-eager but shows "1,-1" with --ion-eager. Tested on
> js debug shell on m-c changeset 1426ffa9caf2 on ARM Ubuntu Linux.
...
Good catch, thanks. The problem is the AbsI operation on the ARM. It uses the GreaterThanOrEqual condition after a 'tst' instruction, but the V flag is undefined on the ARM after this instruction. It should be an easy fix to just use the 'Unsigned' condition test. Shall do some testing and check the x86.
Flags: needinfo?(mrosenberg)
Flags: needinfo?(dtc-moz)
Assignee | ||
Comment 2•11 years ago
|
||
Assignee: general → dtc-moz
Attachment #8343684 -
Flags: review?(mrosenberg)
Assignee | ||
Comment 3•11 years ago
|
||
Sorry, correcting conditional.
Attachment #8343684 -
Attachment is obsolete: true
Attachment #8343684 -
Flags: review?(mrosenberg)
Attachment #8343685 -
Flags: review?(mrosenberg)
Reporter | ||
Comment 4•11 years ago
|
||
This issue blocks running the compareJIT fuzzer on ARM platforms, setting [fuzzblocker].
Whiteboard: [fuzzblocker]
Updated•11 years ago
|
Attachment #8343685 -
Flags: review?(mrosenberg) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Comment on attachment 8343685 [details] [diff] [review]
Correct AbsI, integer absolute value
Review of attachment 8343685 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit/CodeGenerator.cpp
@@ +3799,5 @@
> masm.test32(input, input);
> +#ifdef JS_CPU_ARM
> + masm.j(Assembler::Unsigned, &positive);
> +#else
> + masm.j(Assembler::NotSigned, &positive);
Thanks for fixing this! But instead of adding another #ifdef JS_CPU_ARM can we please use either Unsigned or NotSigned everywhere? We try to avoid such #ifdefs as much as possible.
Reporter | ||
Comment 6•11 years ago
|
||
Removing checkin-needed pending comment 5.
Flags: needinfo?(dtc-moz)
Keywords: checkin-needed
Assignee | ||
Comment 7•11 years ago
|
||
Address feedback in comment 5 - use the common nomenclature of 'NotSigned'.
Carrying forward r+.
Attachment #8343685 -
Attachment is obsolete: true
Attachment #8344246 -
Flags: review+
Flags: needinfo?(dtc-moz)
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 8•11 years ago
|
||
Comment 9•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•