HomePhabricator

[X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfault

Authored by sconstab on Apr 10 2020, 5:32 PM.

Description

[X86] Fix to X86LoadValueInjectionRetHardeningPass for possible segfault

MBB.back() could segfault if MBB.empty(). Fixed by checking for MBB.empty() in the loop.

Differential Revision: https://reviews.llvm.org/D77584