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:

committed by
Eric Engestrom

parent
fab56a0d03
commit
d93e7ef99f
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user