From ec9675ec533cc0c0c7b1c738280e9b9adf2591fb Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 29 Jul 2010 16:39:36 -0700 Subject: 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! --- src/glsl/glsl_parser_extras.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/glsl/glsl_parser_extras.cpp') diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 20a5021b14..15fa61d950 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; } -- cgit v1.2.3