[PATCH] D98726: [analyzer] Enabling MallocChecker to take up after SmartPtrModelling

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 17 16:17:40 PDT 2021


xazax.hun added a comment.

We probably did not update this PR with the discussions we had offline. Basically we had a bug with a sink node due to calling into a destructor of `unique_ptr`. The catch is that the ctor was evalcalled, so the store did not have the correct bindings. Thus, after inlining the dtor the analyzer though we are reading garbage values from memory and a sink node was generated. SuppressOnSink machinery suppressed the leak warning.

The solution here is probably to EvalCall on the dtor as well so the analyzer does not end up thinking the code is reading garbage values from memory.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98726/new/

https://reviews.llvm.org/D98726



More information about the cfe-commits mailing list