[PATCH] D67845: SSP: [3/3] cmpxchg and addrspacecast can now trigger stack protection

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 10:44:46 PDT 2019


probinson created this revision.
probinson added reviewers: jdoerfert, efriedma, arsenm.
Herald added subscribers: jfb, hiraditya, wdng.
Herald added a project: LLVM.

cmpxchg has store-like semantics, and addrspacecast is like bitcast, as far as SSP is concerned.

The test is derived from captures.ll written by Matt Arsenault for r363169.
I tweaked it slightly, running 'llc' instead of 'opt' because StackProtector is a CodeGen pass not a Transform; I also added the llvm.memset test, which hadn't been covered before.
We could be smarter about avoiding stack canaries in the llvm.mem* case, but that's for another time.


https://reviews.llvm.org/D67845

Files:
  llvm/lib/CodeGen/StackProtector.cpp
  llvm/test/CodeGen/X86/stack-protector-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67845.221064.patch
Type: text/x-patch
Size: 9179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190920/85901b19/attachment.bin>


More information about the llvm-commits mailing list