diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-03-30 19:27:42 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-03-30 19:27:42 +0000 |
commit | 95f9a68b1f8fa4d9a93b8eb5abc5c5c9bc58ee5b (patch) | |
tree | 8efbecd374834a29c231fab1f3209e5832ccf226 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 6a5cd5e1cad601bfe3785654f6bbdfe81844bc07 (diff) | |
download | llvm-95f9a68b1f8fa4d9a93b8eb5abc5c5c9bc58ee5b.zip llvm-95f9a68b1f8fa4d9a93b8eb5abc5c5c9bc58ee5b.tar.gz llvm-95f9a68b1f8fa4d9a93b8eb5abc5c5c9bc58ee5b.tar.bz2 |
[analyzer] Track null or undef values through pointer arithmetic.
Pointer arithmetic on null or undefined pointers results in null or undefined
pointers. This is obvious for undefined pointers; for null pointers it follows
from our incorrect-but-somehow-working approach that declares that 0 (Loc)
doesn't necessarily represent a pointer of numeric address value 0, but instead
it represents any pointer that will cause a valid "null pointer dereference"
issue when dereferenced.
For now we've been seeing through pointer arithmetic at the original dereference
expression, i.e. in bugreporter::getDerefExpr(), but not during further
investigation of the value's origins in bugreporter::trackNullOrUndefValue().
The patch fixes it.
Differential Revision: https://reviews.llvm.org/D45071
llvm-svn: 328896
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions