Skip to content
Commit 842dc35f authored by Akshay Khadse's avatar Akshay Khadse Committed by Luo, Yuanke
Browse files

Guard against dereferencing a nullptr

In `lib/CodeGen/PrologEpilogInserter.cpp` file, `RS` is assigned via `RS = TRI->requiresRegisterScavenging(MF) ? new RegScavenger() : nullptr;`. This means that `RS` can be `nullptr`. While executing the `TFI->processFunctionBeforeFrameFinalized(MF, RS);`, the `RS` can be dereferenced in the call `RS->enterBasicBlock(MBB);` in file `lib/Target/AMDGPU/SIFrameLowering.cpp`

Reviewed By: skan, arsenm

Differential Revision: https://reviews.llvm.org/D146791
parent 56fdac60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment