Closed
Bug 1122403
Opened 10 years ago
Closed 10 years ago
Differential Testing: Different output message involving asm.js
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | affected |
People
(Reporter: gkw, Assigned: sunfish)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file)
3.46 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
function g() {
"use asm";
function f() {
return (1 & (1 / 0xffffffff)) | 0
}
return f
}
print(g()())
$ ./js-dbg-opt-32-dm-nsprBuild-darwin-89a190592267 --fuzzing-safe --no-threads --ion-eager 6059.js
1
$ ./js-dbg-opt-32-dm-nsprBuild-darwin-89a190592267 --fuzzing-safe --no-threads --baseline-eager --no-fpu 6059.js
0
Tested this on m-c rev 89a190592267.
My configure flags are:
LD=ld CROSS_COMPILE=1 CC="clang -Qunused-arguments -msse2 -mfpmath=sse -arch i386" RANLIB=ranlib CXX="clang++ -Qunused-arguments -msse2 -mfpmath=sse -arch i386" AS=$CC AR=ar STRIP="strip -x -S" HOST_CC="clang -Qunused-arguments -msse2 -mfpmath=sse" AUTOCONF=/usr/local/Cellar/autoconf213/2.13/bin/autoconf213 HOST_CXX="clang++ -Qunused-arguments -msse2 -mfpmath=sse" sh /Users/skywalker/trees/mozilla-central/js/src/configure --target=i386-apple-darwin9.2.0 --enable-macos-target=10.5 --enable-debug --enable-optimize --enable-nspr-build --enable-more-deterministic --with-ccache --enable-gczeal --enable-debug-symbols --disable-tests
autoBisect is running.
![]() |
Reporter | |
Comment 1•10 years ago
|
||
I can't seem to get a good bisection result. Setting needinfo? from Luke as a start.
Flags: needinfo?(luke)
![]() |
||
Comment 2•10 years ago
|
||
Odin produces the expression MAsmJSReturn(MBitAnd(1, MDiv(unsigned=true, 1, 0xffffffff))) and GVN replaces this with the constant 1. Confirming this, toggling "--ion-gvn=on/off" changes the output when asm.js is enabled.
Flags: needinfo?(luke)
Assignee | ||
Comment 3•10 years ago
|
||
Constant folding isn't handling unsigned div or mod properly. It's doing a plain divide, so 1/0xffffffff is evaluated as 1/-1.
Assignee: nobody → sunfish
Assignee | ||
Comment 4•10 years ago
|
||
Constant folding of div and mod needs to be aware of the unsigned flag.
Attachment #8550442 -
Flags: review?(nicolas.b.pierron)
Updated•10 years ago
|
Attachment #8550442 -
Flags: review?(nicolas.b.pierron) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•