Temporarily add nullptr checks in frontend

The fuzzer is able to trigger nullptr reads by failing to create objects
and then using the resulting nullptr in other operations. The proper fix
is to implement WebGPU error handling where creation failure returns a
valid but "error" object.

However implementing this error handling is a lot of work, so in the
meantime we use nullptr checks in relevant places to fix the fuzzer
issue. These checks will be removed once the error handling is changed.

BUG=dawn:8

Change-Id: I6777a7fa40383b3d2235e071c3f0109de7605a22
Reviewed-on: https://dawn-review.googlesource.com/c/2565
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2018-12-10 10:03:08 +00:00
committed by Commit Bot service account
parent c789b84d8d
commit c3ecb5a77c
11 changed files with 119 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ class RenderPipelineValidationTest : public ValidationTest {
renderpass = CreateSimpleRenderPass();
dawn::PipelineLayout pl = utils::MakeBasicPipelineLayout(device, nullptr);
pipelineLayout = utils::MakeBasicPipelineLayout(device, nullptr);
inputState = device.CreateInputStateBuilder().GetResult();