Skip to content

Commit

Permalink
Merge pull request #69 from AdrianCX/acruceru/segv-compile
Browse files Browse the repository at this point in the history
[X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfault
  • Loading branch information
nikic committed Jul 11, 2020
2 parents 6810e22 + a2c62c7 commit 86b120e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ bool X86LoadValueInjectionRetHardeningPass::runOnMachineFunction(

bool Modified = false;
for (auto &MBB : MF) {
if (MBB.empty())
continue;

MachineInstr &MI = MBB.back();
if (MI.getOpcode() != X86::RETQ)
continue;
Expand Down

0 comments on commit 86b120e

Please sign in to comment.