Commit 640d597d by Olli Etuaho Committed by Commit Bot

Add missing check in Compiler

Further AST traversals should not be run in case the expression complexity check failed and set success=false. Otherwise traversal can result in stack overflow. BUG=chromium:780545 TEST=WebGL conformance tests Change-Id: Icfde8c051038c691563e199a6d3a17b1e8e5ebf5 Reviewed-on: https://chromium-review.googlesource.com/750781 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 4ef25033
...@@ -395,7 +395,8 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[], ...@@ -395,7 +395,8 @@ TIntermBlock *TCompiler::compileTreeImpl(const char *const shaderStrings[],
RemoveNoOpCasesFromEndOfSwitchStatements(root, &symbolTable); RemoveNoOpCasesFromEndOfSwitchStatements(root, &symbolTable);
// Remove empty switch statements - this makes output simpler. // Remove empty switch statements - this makes output simpler.
RemoveEmptySwitchStatements(root); if (success)
RemoveEmptySwitchStatements(root);
// Create the function DAG and check there is no recursion // Create the function DAG and check there is no recursion
if (success) if (success)
......
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