Closed
Bug 1122344
Opened 10 years ago
Closed 10 years ago
Differential Testing: Different output message involving Math.round
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: gkw, Assigned: bbouvier)
References
Details
(Keywords: regression, testcase)
Attachments
(1 file)
(deleted),
patch
|
mjrosenb
:
review+
|
Details | Diff | Splinter Review |
function f() {
print(Math.round(Math.fround(Math.expm1(Math.log2(4294967297)) | 0)))
};
f();
f();
$ ./js-dbg-opt-64-dm-nsprBuild-darwin-89a190592267 --fuzzing-safe --no-threads --ion-eager a2cjs.js
-13527757
-13527756
$ ./js-dbg-opt-64-dm-nsprBuild-darwin-89a190592267 --fuzzing-safe --no-threads --baseline-eager a2cjs.js
-13527757
-13527757
Tested this on m-c rev 89a190592267.
My configure flags are:
CC="clang -Qunused-arguments" CXX="clang++ -Qunused-arguments" AR=ar AUTOCONF=/usr/local/Cellar/autoconf213/2.13/bin/autoconf213 sh /Users/skywalker/trees/mozilla-central/js/src/configure --target=x86_64-apple-darwin12.5.0 --enable-debug --enable-optimize --enable-nspr-build --enable-more-deterministic --with-ccache --enable-gczeal --enable-debug-symbols --disable-tests
autoBisect is running.
Reporter | ||
Updated•10 years ago
|
Summary: Differential Testing: Different output message involving asm.js and SharedArrayBuffer → Differential Testing: Different output message involving Math.round, Math.fround, Math.expm1 and Math.log2
Reporter | ||
Comment 1•10 years ago
|
||
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/a1b396e1f1dd
user: Benjamin Bouvier
date: Fri Feb 28 12:07:05 2014 +0100
summary: Bug 930477: Specialize Round for Float32; r=jandem,mjrosenb
Benjamin, is bug 930477 a possible regressor?
Blocks: 930477
Flags: needinfo?(benj)
Summary: Differential Testing: Different output message involving Math.round, Math.fround, Math.expm1 and Math.log2 → Differential Testing: Different output message involving Math.round
Assignee | ||
Comment 2•10 years ago
|
||
So that's the case from bug 1073910, showing up on x86. It's already fixed on
ARM, but with some different implementation. My new theory is that numbers
in [0.5, -0] should be added 0.5, and all other numbers 0.499999...
(These rounding errors are frustrating, but I cannot craft a nice single test
case file that would try all numbers. I think the functions Math.round and
Math.round(Math.fround()) would need to get cloned at call-site in such a
perfect test case file, and each value should be tested against its own clone.
Tried a few things, but there's always sometimes that gets wrong at some
point...)
Attachment #8560480 -
Flags: review?(mrosenberg)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → benj
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(benj)
Assignee | ||
Comment 3•10 years ago
|
||
Updated•10 years ago
|
Attachment #8560480 -
Flags: review?(mrosenberg) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Status: ASSIGNED → 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
•