[PATCH] D45564: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition

2018-04-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330009: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition (authored by xazax, committed by ). Repository: rC Clang https://reviews.llvm.org/D45564 Files:

[PATCH] D45564: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition

2018-04-13 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl updated this revision to Diff 142381. r.stahl edited the summary of this revision. r.stahl added a comment. addressed review comments. I created a new test because certain checkers would cause early exits in the engine (because of undefined func ptr) and not cause the crash. Since I

[PATCH] D45564: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition

2018-04-12 Thread Gábor Horváth via Phabricator via cfe-commits
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

[PATCH] D45564: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition

2018-04-12 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. I encountered this with a construct like this: struct S { void (*fp)(); }; int main() { struct S s; s.fp(); } Repository: rC Clang https://reviews.llvm.org/D45564 ___ cfe-commits mailing

[PATCH] D45564: [analyzer] Fix null deref in AnyFunctionCall::getRuntimeDefinition

2018-04-12 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: xazax.hun, dcoughlin, a.sidorin, george.karpenkov. Herald added subscribers: cfe-commits, rnkovacs, szepet. In https://reviews.llvm.org/D30691 code was added to getRuntimeDefinition that does not handle the case when FD==nullptr.