Mesa (master): glsl: add missing initialization of the location path field
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 21 12:37:59 UTC 2019
Module: Mesa
Branch: master
Commit: c573b501797c600c176da413ef75ee81454ec050
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c573b501797c600c176da413ef75ee81454ec050
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Nov 21 10:05:49 2019 +0100
glsl: add missing initialization of the location path field
This was apparently missed in 67b32190f3c95, which added support
for ARB_shading_language_include to #line, including the 'path'
field for the location.
Fixes crashes in CTS with all drivers as they attempt to access
an uninitialized path string during parsing.
Fixes: 67b32190f3c95 ("glsl: add ARB_shading_language_include support to #line")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2132
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Jose Maria Casanova <jmcasanova at igalia.com>
---
src/compiler/glsl/glsl_parser_extras.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 444a51dfdb5..c9d579ccb85 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -962,6 +962,7 @@ do { \
(Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC(Rhs, N).last_line; \
(Current).last_column = YYRHSLOC(Rhs, N).last_column; \
+ (Current).path = YYRHSLOC(Rhs, N).path; \
} \
else \
{ \
@@ -969,6 +970,7 @@ do { \
YYRHSLOC(Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC(Rhs, 0).last_column; \
+ (Current).path = YYRHSLOC(Rhs, 0).path; \
} \
(Current).source = 0; \
} while (0)
More information about the mesa-commit
mailing list