From: Gert Wollny Date: Sun, 12 Apr 2020 14:43:23 +0000 (+0200) Subject: r600/sfn: Fix null pointer deref in live range evalation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de7ea88ff852080429c46da332f38224e01e0e36;p=mesa.git r600/sfn: Fix null pointer deref in live range evalation Signed-off-by: Gert Wollny Part-of: --- 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)