glcpp: Initialize location structure at beginning of parse.
authorCarl Worth <cworth@cworth.org>
Tue, 10 Aug 2010 23:58:28 +0000 (16:58 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 10 Aug 2010 23:58:28 +0000 (16:58 -0700)
commit485f84d36608b4545fc5a0061f9ab3ac71b9e36e
tree7f9adebdb09ea6af779bb67788b6a3c05c94bf5d
parenta7d6c496cfe2165468c4151f0838ebfd2122a990
glcpp: Initialize location structure at beginning of parse.

Since we have a custom structure for YYLTYPE locations, we need to use
an %initial-action directive to avoid triggering use of uninitialized
memory when, for example, printing error messages.

We apparently don't yet have a test case that allowed valgrind to find
this bug for us, but valgrind found a similar problem in the other
parser, so we fix this one as well.
src/glsl/glcpp/glcpp-parse.y