Parse DWARF information to reduce false positives.
authorMitch Phillips <mitchphillips@outlook.com>
Tue, 31 Oct 2017 23:20:05 +0000 (23:20 +0000)
committerMitch Phillips <mitchphillips@outlook.com>
Tue, 31 Oct 2017 23:20:05 +0000 (23:20 +0000)
commit7db6f7a344653a7425ab1d6263f3c9a8356556a4
treec24cfd12feff449f82f64196375904a0eb4a1c4c
parent7438b2631720c9e7cbd23d9ce789cafd02400cd5
Parse DWARF information to reduce false positives.

Summary: Help differentiate code and data by parsing DWARF information. This will reduce false positive rates where data is placed in executable sections and is mistakenly parsed as code, resulting in an inflation in the number of indirect CF instructions (and hence an inflation of the number of unprotected).

Also prints the DWARF line data around the region of each indirect CF instruction.

Reviewers: pcc

Subscribers: probinson, llvm-commits, vlad.tsyrklevich, mgorny, aprantl, kcc

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

llvm-svn: 317050
13 files changed:
llvm/test/tools/llvm-cfi-verify/X86/indirect-cf-elimination.s [new file with mode: 0644]
llvm/test/tools/llvm-cfi-verify/X86/lit.local.cfg [new file with mode: 0644]
llvm/test/tools/llvm-cfi-verify/X86/protected-lineinfo.s [new file with mode: 0644]
llvm/test/tools/llvm-cfi-verify/X86/unprotected-lineinfo.s [new file with mode: 0644]
llvm/test/tools/llvm-cfi-verify/X86/unprotected-nolineinfo.s [new file with mode: 0644]
llvm/tools/llvm-cfi-verify/CMakeLists.txt
llvm/tools/llvm-cfi-verify/LLVMBuild.txt
llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp
llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h
llvm/tools/llvm-cfi-verify/lib/GraphBuilder.cpp
llvm/tools/llvm-cfi-verify/lib/LLVMBuild.txt
llvm/tools/llvm-cfi-verify/llvm-cfi-verify.cpp