Commit 9222cd55 authored by jgruber's avatar jgruber Committed by Commit Bot

[fuzzers] Add hash to regexp-builtins CHECK

The hash avoids assigning all CHECK failures to the same clusterfuzz
report.

Bug: chromium:805970
Change-Id: Ia52da335ea86fbc7cc924dd81a893722a6d3d92e
Reviewed-on: https://chromium-review.googlesource.com/894323Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50992}
parent 0b2edc40
......@@ -25,6 +25,7 @@ namespace internal {
namespace {
constexpr bool kVerbose = false; // For debugging, verbose error messages.
constexpr uint32_t kRegExpBuiltinsFuzzerHashSeed = 83;
#define REGEXP_BUILTINS(V) \
V(Exec, exec) \
......@@ -358,7 +359,13 @@ void CompileRunAndVerify(FuzzerArgs* args, const std::string& source) {
return;
}
CHECK(ResultsAreIdentical(args));
if (!ResultsAreIdentical(args)) {
uint32_t hash = StringHasher::HashSequentialString(
args->input_data, static_cast<int>(args->input_length),
kRegExpBuiltinsFuzzerHashSeed);
V8_Fatal(__FILE__, __LINE__,
"!ResultAreIdentical(args); RegExpBuiltinsFuzzerHash=%x", hash);
}
}
void TestRegExpPrototypeExec(FuzzerArgs* args) {
......
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