Module: Mesa Branch: staging/23.3 Commit: d93e7ef99f470ef1ea2391b90b21907c3665ab70 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d93e7ef99f470ef1ea2391b90b21907c3665ab70
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Mon Nov 13 21:20:12 2023 +0100 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774> (cherry picked from commit af8e6c93473da991abbf588ce24ef409b08e84ce) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_sqtt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1345c776293..759b86b4638 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/drivers/radeonsi/si_sqtt.c b/src/gallium/drivers/radeonsi/si_sqtt.c index eeaa83f05c4..f80d01a401f 100644 --- a/src/gallium/drivers/radeonsi/si_sqtt.c +++ b/src/gallium/drivers/radeonsi/si_sqtt.c @@ -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;
