[analyzer] Done some changes to detect Uninitialized read by the char array manipulat...
authorphyBrackets <singh.shivamsingh2003@gmail.com>
Fri, 4 Mar 2022 06:45:27 +0000 (12:15 +0530)
committerphyBrackets <singh.shivamsingh2003@gmail.com>
Fri, 4 Mar 2022 06:47:58 +0000 (12:17 +0530)
Few weeks back I was experimenting with reading the uninitialized values from src , which is actually a bug but the CSA seems to give up at that point . I was curious about that and I pinged @steakhal on the discord and according to him this seems to be a genuine issue and needs to be fix. So I goes with fixing this bug and thanks to @steakhal who help me creating this patch. This feature seems to break some tests but this was the genuine problem and the broken tests also needs to fix in certain manner. I add a test but yeah we need more tests,I'll try to add more tests.Thanks

Reviewed By: steakhal, NoQ

Differential Revision: https://reviews.llvm.org/D120489

clang/docs/analyzer/checkers.rst

index bc42b80..a9ebe06 100644 (file)
@@ -2650,7 +2650,6 @@ Limitations:
   
    - Due to limitations of the memory modeling in the analyzer, one can likely
      observe a lot of false-positive reports like this:
-
       .. code-block:: c
   
         void false_positive() {