[PATCH] D135375: [analyzer] Initialize regions returned by CXXNew to undefined

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 22:36:54 PDT 2022


NoQ added a comment.

Yay I'm glad that you got to implement that!!

> I'd appreciate if the "storing uninitialized value" was placed inside the notes about the call to QScopedArrayPointer's constructor.

It should not be placed inside the notes about the call to constructor, because it doesn't happen during constructor invocation. It happens during `operator new` invocation, which is strictly before the constructor.

I guess we could improve the note to specify that it was operator new that stored the value; this could help in general case as well.

Separately, there *should* be notes inside the constructor as well, about the fact that the constructor *did not* initialize the fields, even though it *could have* (it literally had one job!) - You know, your favorite problem for at least two unrelated reasons =)

> Messag 10 talks about what happens in applyColorTransform, but the important thing happens at the evaluation of the argument, which is not described, so this isn't a very good bug report, can't tell whether its false.

Yeah looks like `trackExpressionValue()` wasn't able to track it inside `transformationToColorSpace()`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135375



More information about the cfe-commits mailing list