commit | 1a668d26f80af893fd8fb94dcab83bfc3bb77dbe | [log] [tgz] |
---|---|---|
author | Ethan Nicholas <ethannicholas@google.com> | Thu Apr 18 10:37:40 2019 -0400 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Thu Apr 18 17:03:07 2019 +0000 |
tree | 63a54342cf5a5a0771a07bd5a79969343a98063a | |
parent | 2c2240f66805ac852507f7eea010c153b42485e3 [diff] [blame] |
fixed assertion failure in skslc SPIR-V output Bug: oss-fuzz:13683 Change-Id: Ifceacb35417b1175b3d561c4f0f9794987a09ec3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209162 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp index c688594..c851db9 100644 --- a/src/sksl/SkSLSPIRVCodeGenerator.cpp +++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -3201,7 +3201,10 @@ main = entry.first; } } - SkASSERT(main); + if (!main) { + fErrors.error(0, "program does not contain a main() function"); + return; + } for (auto entry : fVariableMap) { const Variable* var = entry.first; if (var->fStorage == Variable::kGlobal_Storage &&