Fix double delete with invariant varyings.
The compiler would leave some TString variables lying around
after the pool gets released, leading to a potential crash.
BUG=angle:846
Change-Id: I484ed9b14bba9bf653f6ed4001ae79f87791b0dd
Reviewed-on: https://chromium-review.googlesource.com/232780
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 89ab9a5..148179c 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -1390,7 +1390,7 @@
recover();
return NULL;
}
- symbolTable.addInvariantVarying(*identifier);
+ symbolTable.addInvariantVarying(std::string(identifier->c_str()));
const TVariable *variable = getNamedVariable(identifierLoc, identifier, symbol);
ASSERT(variable);
const TType &type = variable->getType();