This revision was automatically updated to reflect the committed changes. Closed by commit rGdd01d971aa2c: [clang][dataflow] Avoid MaxIterations overflow (authored by jkorous). Herald added a project: clang. Herald added a subscriber: cfe-commits.
Changed prior to commit: https://reviews.llvm.org/D117938?vs=402141&id=402707#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117938/new/ https://reviews.llvm.org/D117938 Files: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp Index: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -210,8 +210,8 @@ // FIXME: Consider making the maximum number of iterations configurable. // FIXME: Set up statistics (see llvm/ADT/Statistic.h) to count average number // of iterations, number of functions that time out, etc. - unsigned Iterations = 0; - static constexpr unsigned MaxIterations = 1 << 16; + uint32_t Iterations = 0; + static constexpr uint32_t MaxIterations = 1 << 16; while (const CFGBlock *Block = Worklist.dequeue()) { if (++Iterations > MaxIterations) { llvm::errs() << "Maximum number of iterations reached, giving up.\n";
Index: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -210,8 +210,8 @@ // FIXME: Consider making the maximum number of iterations configurable. // FIXME: Set up statistics (see llvm/ADT/Statistic.h) to count average number // of iterations, number of functions that time out, etc. - unsigned Iterations = 0; - static constexpr unsigned MaxIterations = 1 << 16; + uint32_t Iterations = 0; + static constexpr uint32_t MaxIterations = 1 << 16; while (const CFGBlock *Block = Worklist.dequeue()) { if (++Iterations > MaxIterations) { llvm::errs() << "Maximum number of iterations reached, giving up.\n";
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits