[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/+/3726295 Reviewed-by: Maya 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}
This commit is contained in:
parent
5d546c2ac0
commit
a618a4a341
@ -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"));
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user