Closed Bug 1293542 Opened 9 years ago Closed 9 years ago

Differential Testing: Different output message involving Math.pow

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
All
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: gkw, Assigned: h4writer)

References

Details

(Keywords: testcase)

Attachments

(1 file)

function f(x, y) { return (Math.pow(y, x != 0) ** -0.5); }; m = [-Infinity]; for (var j = 0; j < 3; ++j) { for (var k = 0; k < 2; ++k) { print(f(m[j], m[k])); } } $ ./js-dbg-64-dm-clang-darwin-720b5d2c84d5 --fuzzing-safe --no-threads --baseline-eager --no-ion testcase.js 0 NaN 0 NaN 0 NaN $ ./js-dbg-64-dm-clang-darwin-720b5d2c84d5 --fuzzing-safe --no-threads --ion-eager testcase.js 0 NaN 0 NaN 1 NaN Tested this on m-c rev 720b5d2c84d5. 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-darwin14.5.0 --disable-jemalloc --enable-debug --enable-more-deterministic --with-ccache --enable-gczeal --enable-debug-symbols --disable-tests python -u ~/funfuzz/js/compileShell.py -b "--enable-debug --enable-more-deterministic" -r 720b5d2c84d5 autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: https://hg.mozilla.org/mozilla-central/rev/33ceb53fd609 user: Hannes Verschore date: Wed Apr 20 06:40:15 2016 -0400 summary: Bug 1263609: SharedStubs - Port JSOP_POW to shared stubs, r=efaust Hannes, is bug 1263609 a likely regressor?
Flags: needinfo?(hv1989)
Another testcase that involves ** but not Math.pow, bisects to the same changeset: function f(x) { return (x ** (1 / ~4294967297) && x); }; for (var i = 0; i < 2; ++i) { print(f(-Infinity)); } $ ./js-dbg-64-dm-clang-darwin-720b5d2c84d5 --fuzzing-safe --no-threads --baseline-eager --no-ion testcase.js 0 0 $ ./js-dbg-64-dm-clang-darwin-720b5d2c84d5 --fuzzing-safe --no-threads --ion-eager testcase.js 0 Infinity
(In reply to Gary Kwong [:gkw] [:nth10sd] from comment #1) > Another testcase that involves ** but not Math.pow, bisects to the same > changeset: > > function f(x) { > return (x ** (1 / ~4294967297) && x); > }; > for (var i = 0; i < 2; ++i) { > print(f(-Infinity)); > } > > > $ ./js-dbg-64-dm-clang-darwin-720b5d2c84d5 --fuzzing-safe --no-threads > --baseline-eager --no-ion testcase.js > 0 > 0 > > $ ./js-dbg-64-dm-clang-darwin-720b5d2c84d5 --fuzzing-safe --no-threads > --ion-eager testcase.js > 0 > Infinity When testing this changeset it also failed before 33ceb53fd609
I tested both tests and they both also fail before 33ceb53fd609. Can you confirm this? Also the result of the first testcase is here: 0 NaN 0 NaN Infinitiy NaN Can you doublecheck the results, to make sure I'm not fixing another bug?
Flags: needinfo?(hv1989) → needinfo?(gary)
Flags: needinfo?(hv1989)
I've tracked this to bug 1111241, which introduced some bugs.
Blocks: 1111241
No longer blocks: 1263609
Attached patch PatchSplinter Review
In bug 1111241 the lowering of visitPowHalfD was adjusted to not redefine input. But to use different input/output registers, but the edge-cases weren't adjusted to account for that.
Assignee: nobody → hv1989
Flags: needinfo?(hv1989)
Attachment #8779746 - Flags: review?(sunfish)
Seems like you've figured things out, thanks!
Flags: needinfo?(gary)
Comment on attachment 8779746 [details] [diff] [review] Patch Review of attachment 8779746 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for tracking this down!
Attachment #8779746 - Flags: review?(sunfish) → review+
Hannes, is this ready for landing?
Flags: needinfo?(hv1989)
(In reply to Gary Kwong [:gkw] [:nth10sd] from comment #8) > Hannes, is this ready for landing? Uh yes! Somehow this got lost in my system. Seems adjusting my system wasn't a good idea. I'll land tomorrow morning. Thanks for the notification!
Flags: needinfo?(hv1989)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Depends on: 1303809
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: