[all-commits] [llvm/llvm-project] 16ef49: [analyzer] Improve diagnostics from ArrayBoundChec...

DonatNagyE via All-commits all-commits at lists.llvm.org
Tue Nov 7 04:26:46 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16ef4968dc9e93f9c7b361b9ad0645445bd1210e
      https://github.com/llvm/llvm-project/commit/16ef4968dc9e93f9c7b361b9ad0645445bd1210e
  Author: DonatNagyE <donat.nagy at ericsson.com>
  Date:   2023-11-07 (Tue, 07 Nov 2023)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
    A clang/test/Analysis/out-of-bounds-diagnostics.c
    M clang/test/Analysis/out-of-bounds-new.cpp
    M clang/test/Analysis/out-of-bounds.c
    M clang/test/Analysis/taint-diagnostic-visitor.c
    M clang/test/Analysis/taint-generic.c
    M clang/test/Analysis/taint-generic.cpp

  Log Message:
  -----------
  [analyzer] Improve diagnostics from ArrayBoundCheckerV2 (#70056)

Previously alpha.security.ArrayBoundV2 produced very spartan bug
reports; this commit ensures that the relevant (and known) details are
reported to the user.

The logic for detecting bugs is not changed, after this commit the
checker will report the same set of issues, but with better messages.

To test the details of the message generation this commit adds a new
test file 'out-of-bounds-diagnostics.c'. Three of the testcases are
added with FIXME notes because they reveal shortcomings of the existing
modeling and bounds checking code. I will try to fix them in separate
follow-up commits.




More information about the All-commits mailing list