projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b2ccd6
)
aco: fix stack buffer overflow in apply_sgprs()
author
Rhys Perry
<pendingchaos02@gmail.com>
Fri, 17 Jan 2020 11:35:20 +0000
(11:35 +0000)
committer
Marge Bot
<eric+marge@anholt.net>
Mon, 20 Jan 2020 11:13:11 +0000
(11:13 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: cef78797191 ('aco: rewrite apply_sgprs()')
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2361
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3442>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3442>
src/amd/compiler/aco_optimizer.cpp
patch
|
blob
|
history
diff --git
a/src/amd/compiler/aco_optimizer.cpp
b/src/amd/compiler/aco_optimizer.cpp
index d8e42d88b7d53f37ce36860dec54f7c012793a6e..8c2514598f08b109f8094e66fe1c7f30f82f9832 100644
(file)
--- a/
src/amd/compiler/aco_optimizer.cpp
+++ b/
src/amd/compiler/aco_optimizer.cpp
@@
-2112,7
+2112,8
@@
void apply_sgprs(opt_ctx &ctx, aco_ptr<Instruction>& instr)
continue;
}
- sgpr_ids[num_sgprs++] = sgpr.id();
+ if (new_sgpr)
+ sgpr_ids[num_sgprs++] = sgpr.id();
ctx.uses[sgpr_info_id]--;
ctx.uses[sgpr.id()]++;
}