OSDN Git Service

StackProtector: Use PointerMayBeCaptured
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 12 Jun 2019 14:23:33 +0000 (14:23 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 12 Jun 2019 14:23:33 +0000 (14:23 +0000)
commit1733b9a34af6ff7e18306c3c471b3174bdc87008
tree9e53765c8ae9287781e787664c2ca5aab5d35b2d
parentceee7cafa8b14cdf586e7bf6d4023e0d54fa2f99
StackProtector: Use PointerMayBeCaptured

This was using its own, outdated list of possible captures. This was
at minimum not catching cmpxchg and addrspacecast captures.

One change is now any volatile access is treated as capturing. The
test coverage for this pass is quite inadequate, but this required
removing volatile in the lifetime capture test.

Also fixes some infrastructure issues to allow running just the IR
pass.

Fixes bug 42238.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363169 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/StackProtector.h
lib/CodeGen/StackProtector.cpp
test/CodeGen/X86/stack-protector.ll
test/Transforms/StackProtector/X86/captures.ll [new file with mode: 0644]
test/Transforms/StackProtector/X86/lit.local.cfg [new file with mode: 0644]
tools/opt/opt.cpp