From af8e6c93473da991abbf588ce24ef409b08e84ce Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 13 Nov 2023 21:20:12 +0100 Subject: [PATCH] radeonsi/sqtt: use calloc instead of malloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes sure the record is fully initialized and fixes RGP crashes or missing shaders. Cc: mesa-stable Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_sqtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_sqtt.c b/src/gallium/drivers/radeonsi/si_sqtt.c index 08333728871..c01fb1b002e 100644 --- a/src/gallium/drivers/radeonsi/si_sqtt.c +++ b/src/gallium/drivers/radeonsi/si_sqtt.c @@ -1027,7 +1027,7 @@ si_sqtt_add_code_object(struct si_context* sctx, struct rgp_code_object *code_object = &sctx->sqtt->rgp_code_object; struct rgp_code_object_record *record; - record = malloc(sizeof(struct rgp_code_object_record)); + record = calloc(1, sizeof(struct rgp_code_object_record)); if (!record) return false;