aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-04-12 16:43:23 +0200
committerMarge Bot <[email protected]>2020-04-21 15:10:43 +0000
commitde7ea88ff852080429c46da332f38224e01e0e36 (patch)
treec0f513a36a193fe5323f81ac5d889f3ca582a0de /src
parent5d10e3ec6066239d732d19f69cd95da447e73e32 (diff)
r600/sfn: Fix null pointer deref in live range evalation
Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_instruction_base.cpp6
1 files 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)