diff options
author | John Brawn <john.brawn@arm.com> | 2020-03-05 17:18:47 +0000 |
---|---|---|
committer | John Brawn <john.brawn@arm.com> | 2020-03-17 12:09:07 +0000 |
commit | c09368313c236291298e1f8f0a9d319b34d61be6 (patch) | |
tree | 22464433053dac0cb8001df8745c76cee9c383c5 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 72ffb16b4cde972dd3b0b5db98d1702fdcccbc6f (diff) | |
download | llvm-c09368313c236291298e1f8f0a9d319b34d61be6.zip llvm-c09368313c236291298e1f8f0a9d319b34d61be6.tar.gz llvm-c09368313c236291298e1f8f0a9d319b34d61be6.tar.bz2 |
[StackProtector] Catch direct out-of-bounds when checking address-takenness
With -fstack-protector-strong we check if a non-array variable has its address
taken in a way that could cause a potential out-of-bounds access. However what
we don't catch is when the address is directly used to create an out-of-bounds
memory access.
Fix this by examining the offsets of GEPs that are ultimately derived from
allocas and checking if the resulting address is out-of-bounds, and by checking
that any memory operations using such addresses are not over-large.
Fixes PR43478.
Differential revision: https://reviews.llvm.org/D75695
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions