[PATCH] D77584: [X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfault
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 18:52:00 PDT 2020
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0505181006f1: [X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfault (authored by sconstab, committed by craig.topper).
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77584/new/
https://reviews.llvm.org/D77584
Files:
llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
Index: llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
===================================================================
--- llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
+++ llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp
@@ -99,6 +99,9 @@
bool Modified = false;
for (auto &MBB : MF) {
+ if (MBB.empty())
+ continue;
+
MachineInstr &MI = MBB.back();
if (MI.getOpcode() != X86::RETQ)
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77584.256735.patch
Type: text/x-patch
Size: 461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200411/a058ffa4/attachment.bin>
More information about the llvm-commits
mailing list