Module: Mesa Branch: staging/23.0 Commit: edc9ab9b0fb18b412d32532ed72f77fe5507c26b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=edc9ab9b0fb18b412d32532ed72f77fe5507c26b
Author: Rhys Perry <[email protected]> Date: Fri Feb 3 17:27:52 2023 +0000 aco: fix out-of-bounds access when moving s_mem(real)time across SMEM Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Georg Lehmann <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8224 Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21138> (cherry picked from commit fad1f716dd831fba4c380bce1cf76bffc11be6d6) --- .pick_status.json | 2 +- src/amd/compiler/aco_scheduler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9c71ce0d0d8..06d2b9f75e7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -22,7 +22,7 @@ "description": "aco: fix out-of-bounds access when moving s_mem(real)time across SMEM", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index f09781435bc..4ab13fe7c30 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -679,7 +679,7 @@ schedule_SMEM(sched_ctx& ctx, Block* block, std::vector<RegisterDemand>& registe current->operands[0].size() == 4)) break; /* don't move descriptor loads below buffer loads */ - if (candidate->format == Format::SMEM && current->operands[0].size() == 4 && + if (candidate->isSMEM() && !candidate->operands.empty() && current->operands[0].size() == 4 && candidate->operands[0].size() == 2) break;
