summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2010-07-29 16:39:36 -0700
committerCarl Worth <[email protected]>2010-07-30 15:03:37 -0700
commitec9675ec533cc0c0c7b1c738280e9b9adf2591fb (patch)
treecaa3c67ab071c32cef5293a0fa5a623bffba7466 /src/glsl
parent40f57c2becbb2cee7cfb6d6ed49dc1db57987e9a (diff)
ast: Initialize location data in constructor of all ast_node objects.
This prevents using uninitialized data in _msea_glsl_error in some cases, (including at least 6 piglit tests). Thanks to valgrind for pointing out the problem!
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glsl_parser_extras.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 20a5021b146..15fa61d9505 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -280,7 +280,9 @@ ast_node::print(void) const
ast_node::ast_node(void)
{
- /* empty */
+ this->location.source = 0;
+ this->location.line = 0;
+ this->location.column = 0;
}