Commit d1652012 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] [fuzzer] Omit input hash in error message

For each single bug, the fuzzer might find many very similar inputs
which trigger this bug. All of them are reported as individual bugs
currently, which means lots of noise in bug reports and increased
workload for the clusterfuzz sheriffs.
After this change, all bugs of the same category ("compiles !=
validates", "interpreter != liftoff", ...) will be grouped together.
This requires us to fix them soon after reporting, as they will hide
all other bugs of the same category.

R=ahaas@chromium.org
CC=mmoroz@chromium.org

Change-Id: Ie203eed0c7681e3450df977b10c0d9dbbc402d34
Reviewed-on: https://chromium-review.googlesource.com/758438Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49231}
parent 4cc8e1d9
...@@ -22,8 +22,6 @@ namespace internal { ...@@ -22,8 +22,6 @@ namespace internal {
namespace wasm { namespace wasm {
namespace fuzzer { namespace fuzzer {
static constexpr uint32_t kWasmCodeFuzzerHashSeed = 83;
static constexpr const char* kNameString = "name"; static constexpr const char* kNameString = "name";
static constexpr size_t kNameStringLength = 4; static constexpr size_t kNameStringLength = 4;
...@@ -175,13 +173,7 @@ int WasmExecutionFuzzer::FuzzWasmModule( ...@@ -175,13 +173,7 @@ int WasmExecutionFuzzer::FuzzWasmModule(
bool validates = SyncValidate(i_isolate, wire_bytes); bool validates = SyncValidate(i_isolate, wire_bytes);
if (compiles != validates) { CHECK_EQ(compiles, validates);
uint32_t hash = StringHasher::HashSequentialString(
data, static_cast<int>(size), kWasmCodeFuzzerHashSeed);
V8_Fatal(__FILE__, __LINE__,
"compiles != validates (%d vs %d); WasmCodeFuzzerHash=%x",
compiles, validates, hash);
}
if (!compiles) return 0; if (!compiles) return 0;
...@@ -232,13 +224,7 @@ int WasmExecutionFuzzer::FuzzWasmModule( ...@@ -232,13 +224,7 @@ int WasmExecutionFuzzer::FuzzWasmModule(
CHECK_EQ(expect_exception, i_isolate->has_pending_exception()); CHECK_EQ(expect_exception, i_isolate->has_pending_exception());
i_isolate->clear_pending_exception(); i_isolate->clear_pending_exception();
if (!expect_exception && result_interpreter != result_turbofan) { if (!expect_exception) CHECK_EQ(result_interpreter, result_turbofan);
uint32_t hash = StringHasher::HashSequentialString(
data, static_cast<int>(size), kWasmCodeFuzzerHashSeed);
V8_Fatal(__FILE__, __LINE__,
"interpreter != turbofan (%x vs %x); WasmCodeFuzzerHash=%x",
result_interpreter, result_turbofan, hash);
}
} }
int32_t result_liftoff; int32_t result_liftoff;
...@@ -259,13 +245,7 @@ int WasmExecutionFuzzer::FuzzWasmModule( ...@@ -259,13 +245,7 @@ int WasmExecutionFuzzer::FuzzWasmModule(
CHECK_EQ(expect_exception, i_isolate->has_pending_exception()); CHECK_EQ(expect_exception, i_isolate->has_pending_exception());
i_isolate->clear_pending_exception(); i_isolate->clear_pending_exception();
if (!expect_exception && result_interpreter != result_liftoff) { if (!expect_exception) CHECK_EQ(result_interpreter, result_liftoff);
uint32_t hash = StringHasher::HashSequentialString(
data, static_cast<int>(size), kWasmCodeFuzzerHashSeed);
V8_Fatal(__FILE__, __LINE__,
"interpreter != liftoff (%x vs %x); WasmCodeFuzzerHash=%x",
result_interpreter, result_liftoff, hash);
}
} }
return 0; return 0;
......
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