[llvm-bugs] [Bug 38276] New: sime buffer overflow bug not detected by clang static analyzer

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 23 07:35:50 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38276

            Bug ID: 38276
           Summary: sime buffer overflow bug not detected by clang static
                    analyzer
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: ankitkumargupta1996 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20592
  --> https://bugs.llvm.org/attachment.cgi?id=20592&action=edit
contains sample cpp file and build command used

scan-build is not able to detect a simple buffer overflow even with
experimental checkers ON [see attached file].
It uses a simple loop

int * buffer = new int[10];  // allocate 10 bytes
 for(int i=0;i<200;i++)
   buffer[i] =23;   // accessing elements till 199 bytes --- overflow

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180723/cef5e784/attachment.html>


More information about the llvm-bugs mailing list