diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-27 20:54:40 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-27 20:54:40 +0000 |
commit | f01831ebe9fb1a9395318d4f5f854ee9d862a359 (patch) | |
tree | 211493f141a68b91d15582849604c2f77a07496a /lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py | |
parent | 3a76492108d82aad3e497984f59b3822cc8490d2 (diff) | |
download | bcm5719-llvm-f01831ebe9fb1a9395318d4f5f854ee9d862a359.tar.gz bcm5719-llvm-f01831ebe9fb1a9395318d4f5f854ee9d862a359.zip |
[analyzer] Don't crash when dynamic type of a variable is set via placement new.
If a variable or an otherwise a concrete typed-value region is being
placement-new'ed into, its dynamic type may change in arbitrary manners. And
when the region is used, there may be a third type that's different from both
the static and the dynamic type. It cannot be *completely* different from the
dynamic type, but it may be a base class of the dynamic type - and in this case
there isn't (and shouldn't be) any indication anywhere in the AST that there is
a derived-to-base cast from the dynamic type to the third type.
Perform a generic cast (evalCast()) from the third type to the dynamic type
in this case. From the point of view of the SVal hierarchy, this would have
produced non-canonical SVals if we used such generic cast in the normal case,
but in this case there doesn't seem to be a better option.
Differential Revision: https://reviews.llvm.org/D43659
llvm-svn: 326245
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py')
0 files changed, 0 insertions, 0 deletions