[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

Umann Kristóf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 29 04:50:54 PDT 2018


Szelethus added a comment.

In https://reviews.llvm.org/D45532#1145512, @sylvestre.ledru wrote:

> If you are interested, I executed this checker on Firefox code. Results can be found here
>  http://sylvestre.ledru.info/reports/fx-scan-build/


Absolutely, thank you! :)

> Andi reported this bug https://bugs.llvm.org/show_bug.cgi?id=37965

Well, that is intentional: not the pointer, but the pointee is uninitialized, as you can see from the note message. Now with that being said, I have had an other colleague of mine complain about a report, as he didn't see that the note message said "pointee" not "pointer", so maybe there's a point in trying to come up with a better message.

In https://reviews.llvm.org/D45532#1145592, @george.karpenkov wrote:

> @sylvestre.ledru Have you found any actual bugs using this checker?
>  @Szelethus Interesting, it seems that the pointer itself is initialized, but not what it's pointing to.


Exactly.

> I think we should just check the fields directly, and do not attempt to traverse the pointer hierarchy.

Hmm, that's one way of thinking, but I think it's more beneficial to check pointers too.

I'll take a look at some results and try to get back to you with some stats to support my view on this issue :)


Repository:
  rC Clang

https://reviews.llvm.org/D45532





More information about the cfe-commits mailing list