[wasm][fuzzer] Fix instantiation in fuzzer
Reset the instance before the test run, to ensure it runs with the same initial state as the reference run. R=clemensb@chromium.org Bug: chromium:1227591 Change-Id: Ie78b4b84e3df37ab8955c240f1d41e2f5e89a5de Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3015572 Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/master@{#75658}
This commit is contained in:
parent
431598af59
commit
dd8ee88c87
@ -142,6 +142,15 @@ void InterpretAndExecuteModule(i::Isolate* isolate,
|
||||
DCHECK(interpreter_result.trapped());
|
||||
exception_ref = true;
|
||||
}
|
||||
// Reset the instance before the test run.
|
||||
{
|
||||
ErrorThrower thrower(isolate, "Second Instantiation");
|
||||
// We instantiated before, so the second instantiation must also succeed:
|
||||
CHECK(GetWasmEngine()
|
||||
->SyncInstantiate(isolate, &thrower, module_object, {},
|
||||
{}) // no imports & memory
|
||||
.ToHandle(&instance));
|
||||
}
|
||||
} else {
|
||||
Handle<WasmInstanceObject> instance_ref;
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user