From 88519c60873e6a5d67fc1fc09b125e4fe2fa3aee Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 6 Feb 2016 17:08:29 -0500 Subject: glsl: return cloned signature, not the builtin one The builtin data can get released with a glReleaseShaderCompiler call. We're careful everywhere to clone everything that comes out of builtins except here, where we accidentally return the signature belonging to the builtin version, rather than the locally-cloned one. Signed-off-by: Ilia Mirkin Reviewed-by: Timothy Arceri Tested-by: Rob Herring Cc: mesa-stable@lists.freedesktop.org --- src/compiler/glsl/ast_function.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 0eb456a2b1f..c7fdcb24379 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -560,7 +560,8 @@ done: state->symbols->add_global_function(f); emit_function(state, f); } - f->add_signature(sig->clone_prototype(f, NULL)); + sig = sig->clone_prototype(f, NULL); + f->add_signature(sig); } } return sig; -- cgit v1.2.3