[PATCH] D75695: [StackProtector] Catch direct out-of-bounds when checking address-takenness

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 10:18:40 PDT 2020


john.brawn updated this revision to Diff 249970.
john.brawn edited the summary of this revision.
john.brawn added a comment.
Herald added a subscriber: jfb.

Adjusted to avoid looking through pointer types by passing around the allocated type and checking it against the size of memory accesses. Also correctly handle GEPs where the addressed member is partially outside of the allocated object.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75695/new/

https://reviews.llvm.org/D75695

Files:
  llvm/include/llvm/CodeGen/StackProtector.h
  llvm/lib/CodeGen/StackProtector.cpp
  llvm/test/CodeGen/AArch64/stack-guard-oob.ll
  llvm/test/CodeGen/ARM/stack-guard-oob.ll
  llvm/test/CodeGen/Inputs/stack-guard-oob.ll
  llvm/test/CodeGen/X86/stack-guard-oob.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75695.249970.patch
Type: text/x-patch
Size: 17120 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/604f622c/attachment.bin>


More information about the llvm-commits mailing list