Skip to content
Snippets Groups Projects
Commit 4942eae8 authored by Brian Paul's avatar Brian Paul Committed by Carl Worth
Browse files

glsl: fix use-after free bug/crash in ast_declarator_list::hir()


The call to get_variable_being_redeclared() may delete 'var' so we
can't reference var->name afterward.  We fix that by examining the
var's name before making that call.

Fixes valgrind warnings and possible crash when running the piglit
tests/spec/glsl-1.30/execution/clipping/vs-clip-distance-in-param.shader_test
test (and probably others).

Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>

Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
(cherry picked from commit f9cecca7)
parent 1776a562
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment