summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-12-10 18:23:39 -0800
committerArtem Dergachev <artem.dergachev@gmail.com>2019-12-11 11:22:36 -0800
commit2b3f2071ec6561c3f10e5291289c47bb3629e354 (patch)
treec95e1f661ab6ee938523b351ba064e7ffef94616 /lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp
parent134faae04259b0412a067c73069f61905fc451d7 (diff)
downloadbcm5719-llvm-2b3f2071ec6561c3f10e5291289c47bb3629e354.tar.gz
bcm5719-llvm-2b3f2071ec6561c3f10e5291289c47bb3629e354.zip
[analyzer] CStringChecker: Fix overly eager assumption that memcmp args overlap.
While analyzing code `memcmp(a, NULL, n);', where `a' has an unconstrained symbolic value, the analyzer was emitting a warning about the *first* argument being a null pointer, even though we'd rather have it warn about the *second* argument. This happens because CStringChecker first checks whether the two argument buffers are in fact the same buffer, in order to take the fast path. This boils down to assuming `a == NULL' to true. Then the subsequent check for null pointer argument "discovers" that `a' is null. Don't take the fast path unless we are *sure* that the buffers are the same. Otherwise proceed as normal. Differential Revision: https://reviews.llvm.org/D71322
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/recursion/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud