Commit a618a4a3 authored by Michael Achenbach's avatar Michael Achenbach Committed by V8 LUCI CQ

[foozzie] Silence a frequently occuring correctness bug

This CL adds back a patch of Math.pow for correctness fuzzing, which
drops some precision and hides a difference on the fast path.

The same suppression was previously used on https://crbug.com/693426.

No-Try: true
Bug: chromium:1339320
Change-Id: Id52f25f8a2b6b5aeca956587b16a10c61aa68e36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3726295Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81408}
parent 5d546c2a
......@@ -6,3 +6,16 @@
// You can temporarily change JS behavior here to silence known problems.
// Please refer to a bug in a comment and remove the suppression once the
// problem is fixed.
// Suppress https://crbug.com/1339320
(function () {
var oldMathPow = Math.pow
Math.pow = function(a, b){
var s = "" + oldMathPow(a, b)
// Low tech precision mock. Limit digits in string representation.
// The phrases Infinity and NaN don't match the split("e").
s = s.split("e");
s[0] = s[0].substr(0, 15);
return parseFloat(s.join("e"));
}
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment