st/glsl_to_tgsi: avoid iterating past the head of the instruction list
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 22 Feb 2017 19:04:39 +0000 (20:04 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 1 Mar 2017 17:59:36 +0000 (18:59 +0100)
commit911391bd70fe30ad970c5e56632b2d7ccc29d955
treea213fa81a8a1544b26654644968d9a5235d0d243
parent64b215223fb4e4559b30f9eb923c2860373a6e51
st/glsl_to_tgsi: avoid iterating past the head of the instruction list

exec_node::get_prev() does not guard against going past the beginning
of the list, so we need to add explicit checks here.

Found by ASAN in piglit arb_shader_storage_buffer_object-rendering.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp