[PATCH] D51300: [analyzer][UninitializedObjectChecker] No longer using nonloc::LazyCompoundVal

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 4 10:37:23 PDT 2018


NoQ added a comment.

In https://reviews.llvm.org/D51300#1220537, @Szelethus wrote:

> Would you be comfortable me commiting this without that assert


Yup sure.

In https://reviews.llvm.org/D51300#1223042, @Szelethus wrote:

> I'm not even sure how this is possible -- and unfortunately I've been unable to create a minimal (not) working example for this, and I wasn't even able to recreate the error locally.


Sounds like a test case would be great to have. Consider extracting a preprocessed file and running it under //creduce//, that's a great generic method for obtaining small reproducers for crashes and regressions (but not for false positives). As far as i understand, it's a crash on llvm codebase, which should be easy to re-analyze locally, even just one file, because llvm is built with cmake and dumps compilation databases, so just use clang-check on a single file, or simply append --analyze to the compilation database run-line.

This specific problem sounds elusive because it's a problem with pointer casts, and pointer casts are currently a mess. I cannot state for sure that typed this-region type must always be a record, but it's definitely a bad smell when it is't. So i recommend a quick investigation of whether the region in question is (1) well-formed and  (2) correctly reflects the semantics of the program.


https://reviews.llvm.org/D51300





More information about the cfe-commits mailing list