steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed.
Oh wait, should we accept this given this serious limitation? ================ Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:475-479 +def CStringUninitializedRead : Checker<"UninitializedRead">, + HelpText<"Checks if the string manipulation function would read uninitialized bytes">, + Dependencies<[CStringModeling]>, + Documentation<HasAlphaDocumentation>; + ---------------- We also need documentation in the `clang/docs/analyzer/checkers.rst`. Please also note the limitation we experienced and described here. Also refer back to the Umbrella GitHub issue in that section. ================ Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:262 void emitAdditionOverflowBug(CheckerContext &C, ProgramStateRef State) const; + void emitUninitializedRead(CheckerContext &C, ProgramStateRef State, + const Expr *E) const; ---------------- ================ Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:378 + if (StInBound->getSVal(ER).isUndef()) { + llvm::errs() << "Reading from " << ER << "\n"; + emitUninitializedRead(C, StInBound, Buffer.Expression); ---------------- Remove this line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120489/new/ https://reviews.llvm.org/D120489 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits