From 54ceec8d9e0eab30efa21547b15ed66b1655e480 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 31 May 2023 05:23:03 +1000 Subject: [PATCH] radv/meta: fix uninitialised stack memory usage. ==10199== Conditional jump or move depends on uninitialised value(s) ==10199== at 0xA107B13: radv_resume_queries (radv_meta.c:93) ==10199== by 0xA108097: radv_meta_restore (radv_meta.c:225) ==10199== Uninitialised value was created by a stack allocation ==10199== at 0xA1145B2: fill_buffer_shader (radv_meta_buffer.c:171) saved_state is never memset, so the value should be inited. Cc: mesa-stable Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/meta/radv_meta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/meta/radv_meta.c b/src/amd/vulkan/meta/radv_meta.c index d79c186..edcfe00 100644 --- a/src/amd/vulkan/meta/radv_meta.c +++ b/src/amd/vulkan/meta/radv_meta.c @@ -127,6 +127,7 @@ radv_meta_save(struct radv_meta_saved_state *state, struct radv_cmd_buffer *cmd_ assert(flags & (RADV_META_SAVE_GRAPHICS_PIPELINE | RADV_META_SAVE_COMPUTE_PIPELINE)); state->flags = flags; + state->active_occlusion_queries = 0; state->active_prims_gen_gds_queries = 0; state->active_prims_xfb_gds_queries = 0; -- 2.7.4