Index: test/fuzzer/wasm-code.cc |
diff --git a/test/fuzzer/wasm-code.cc b/test/fuzzer/wasm-code.cc |
index feb3e24618f8975cafa7d1ce5bbf7a0971cb28e8..130c8a88f1c870280d0504c42294c70096bd8c81 100644 |
--- a/test/fuzzer/wasm-code.cc |
+++ b/test/fuzzer/wasm-code.cc |
@@ -7,6 +7,7 @@ |
#include "include/v8.h" |
#include "src/isolate.h" |
+#include "src/objects.h" |
#include "src/wasm/encoder.h" |
#include "src/wasm/wasm-interpreter.h" |
#include "src/wasm/wasm-module.h" |
@@ -92,6 +93,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
CHECK(i_isolate->has_pending_exception()); |
i_isolate->clear_pending_exception(); |
} else { |
+ if (result_interpreted != result_compiled) { |
+ V8_Fatal( |
+ __FILE__, __LINE__, |
+ "Interpreter result (%d) != compiled module result (%d). Hash: %u", |
+ result_interpreted, result_compiled, |
+ v8::internal::StringHasher::HashSequentialString( |
+ data, static_cast<int>(size), 83)); |
titzer
2016/09/22 09:54:17
what is 83? the seed? Maybe add a constant here.
|
+ } |
CHECK_EQ(result_interpreted, result_compiled); |
} |
return 0; |