radeonsi/sqtt: use calloc instead of malloc

This makes sure the record is fully initialized and
fixes RGP crashes or missing shaders.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
(cherry picked from commit af8e6c9347)
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2023-11-13 21:20:12 +01:00
committed by Eric Engestrom
parent fab56a0d03
commit d93e7ef99f
2 changed files with 2 additions and 2 deletions

View File

@@ -174,7 +174,7 @@
"description": "radeonsi/sqtt: use calloc instead of malloc",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View File

@@ -1031,7 +1031,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;