Module: Mesa Branch: staging/20.0 Commit: c81092f789b0c0f9fe16434b4d8728d2d4dec3d1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c81092f789b0c0f9fe16434b4d8728d2d4dec3d1
Author: Marek Olšák <[email protected]> Date: Sat Mar 21 17:54:36 2020 -0400 st/mesa: fix use of uninitialized memory due to st_nir_lower_builtin reported by valgrind Cc: 19.3 20.0 <[email protected]> Reviewed-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4274> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4274> (cherry picked from commit 719063d4d07a8f2ab2f256ea697083a8eb07e32a) --- .pick_status.json | 2 +- src/mesa/state_tracker/st_nir_lower_builtin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3779ecba1c5..ed44dae2211 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -355,7 +355,7 @@ "description": "st/mesa: fix use of uninitialized memory due to st_nir_lower_builtin", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/mesa/state_tracker/st_nir_lower_builtin.c b/src/mesa/state_tracker/st_nir_lower_builtin.c index f6f9bf15278..e9236675c72 100644 --- a/src/mesa/state_tracker/st_nir_lower_builtin.c +++ b/src/mesa/state_tracker/st_nir_lower_builtin.c @@ -138,7 +138,7 @@ get_variable(lower_builtin_state *state, nir_deref_path *path, nir_variable_create(shader, nir_var_uniform, glsl_vec4_type(), name); var->num_state_slots = 1; - var->state_slots = ralloc_array(var, nir_state_slot, 1); + var->state_slots = rzalloc_array(var, nir_state_slot, 1); memcpy(var->state_slots[0].tokens, tokens, sizeof(var->state_slots[0].tokens)); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
