[PATCH] D130974: [analyzer] Fix for the crash in #56873

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 04:06:00 PDT 2022


steakhal added a comment.

In D130974#3709502 <https://reviews.llvm.org/D130974#3709502>, @isuckatcs wrote:

>> Some checker should have caught the uninitialized value earlier than the defaultEvalCall().
>> I guess, the MallocCkecher could have checked for it in PreStmt<CXXNewExpr>.
>> Or alternatively, the CallAndMessageChecker::preCall() already does something like this in the PreVisitProcessArg(). I know that CXXNewExpr is not a call, but you get the idea.
>> WDYT, worth catching it?
>
> I definitely think it's worth catching it. I'm working on a checker which addresses this in D131299 <https://reviews.llvm.org/D131299>. It was originally intended to be a part of MallocChecker but has been moved to a separate one.

If so, shouldn't be some dependencies across these revisions? You could also specify an additional RUN line to demonstrate that this can be caught by an experimental configuration.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130974



More information about the cfe-commits mailing list