[foozzie] Add sanity check for missing natives suppression

This prevents bug flooding based on differences from calling
%GetOptimizationStatus in correctness tests. It is supposed to
be suppressed with --allow-natives-for-differential-fuzzing.
This ensures early bail-out in case the flag is forgotten at
some point. The v8_sanity_checks.js file is executed before
each correctness test case for this purpose.

NOTRY=true

Bug: chromium:1044942
Change-Id: I74a836a82562604b35e94e5e123a2a8bff939423
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2184294
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67618}
This commit is contained in:
Michael Achenbach 2020-05-06 13:41:07 +02:00 committed by Commit Bot
parent 73a27ef150
commit 8140856013

View File

@ -30,3 +30,16 @@ print("https://crbug.com/985154");
}
print(Object.getOwnPropertyNames(foo().bar));
})();
print("Suppresses sensitive natives");
(function () {
function foo() {}
%PrepareFunctionForOptimization(foo);
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
print(%GetOptimizationStatus(foo));
const fun = new Function("f", "sync", "return %GetOptimizationStatus(f);");
print(fun(foo));
})();