[PATCH] D45564: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 08:10:22 PDT 2018
xazax.hun added a comment.
We encountered the same problem but did not have time yet to submit the patch. We have literally the same fix internally, so it looks good to me. One minor style nit inline.
Could you add your repro as a regression test? You can also extend existing CTU tests just make sure to trigger the crash before the patch.
Thank you for the submission and the minimal reproducer.
================
Comment at: lib/StaticAnalyzer/Core/CallEvent.cpp:390
const FunctionDecl *FD = getDecl();
+ if (!FD) {
+ return {};
----------------
We usually do not write the braces for single statements.
Repository:
rC Clang
https://reviews.llvm.org/D45564
More information about the cfe-commits
mailing list