Mesa (master): r600/sfn: Fix null pointer deref in live range evalation
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 21 15:20:08 UTC 2020
Module: Mesa
Branch: master
Commit: de7ea88ff852080429c46da332f38224e01e0e36
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=de7ea88ff852080429c46da332f38224e01e0e36
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Sun Apr 12 16:43:23 2020 +0200
r600/sfn: Fix null pointer deref in live range evalation
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
---
src/gallium/drivers/r600/sfn/sfn_instruction_base.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/r600/sfn/sfn_instruction_base.cpp b/src/gallium/drivers/r600/sfn/sfn_instruction_base.cpp
index 22dfa5739f5..acbc5650b1f 100644
--- a/src/gallium/drivers/r600/sfn/sfn_instruction_base.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_instruction_base.cpp
@@ -120,7 +120,8 @@ void Instruction::remap_registers(ValueRemapper& map)
void Instruction::add_remappable_src_value(PValue *v)
{
- m_mappable_src_registers.push_back(v);
+ if (*v)
+ m_mappable_src_registers.push_back(v);
}
void Instruction::add_remappable_src_value(GPRVector *v)
@@ -130,7 +131,8 @@ void Instruction::add_remappable_src_value(GPRVector *v)
void Instruction::add_remappable_dst_value(PValue *v)
{
- m_mappable_dst_registers.push_back(v);
+ if (v)
+ m_mappable_dst_registers.push_back(v);
}
void Instruction::add_remappable_dst_value(GPRVector *v)
More information about the mesa-commit
mailing list