diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2017-10-13 20:11:00 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2017-10-13 20:11:00 +0000 |
commit | db65f969f233b0f8c5aebb5067d4eeb80d050b56 (patch) | |
tree | 12efdbfe5678fb80b41eaeccfe99998bc6b1f347 /llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp | |
parent | 52dbdc04fe6eaa91cc3c7b0966b242b673e0e823 (diff) | |
download | bcm5719-llvm-db65f969f233b0f8c5aebb5067d4eeb80d050b56.tar.gz bcm5719-llvm-db65f969f233b0f8c5aebb5067d4eeb80d050b56.zip |
[analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled.
The checker used to crash when a mempcpy's length argument is symbolic. In this
case the cast from 'void *' to 'char *' failed because the respective
ElementRegion that represents cast is hard to add on top of the existing
ElementRegion that represents the offset to the last copied byte, while
preseving a sane memory region structure.
Additionally, a few test cases are added (to casts.c) which demonstrate problems
caused by existing sloppy work we do with multi-layer ElementRegions. If said
cast would be modeled properly in the future, these tests would need to be
taken into account.
Differential Revision: https://reviews.llvm.org/D38797
llvm-svn: 315742
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp')
0 files changed, 0 insertions, 0 deletions