[llvm-bugs] [Bug 28188] New: Static analyzer should not report error in memcpy()/memmove() with null pointer when length argument is zero.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 18 04:11:36 PDT 2016


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

            Bug ID: 28188
           Summary: Static analyzer should not report error in
                    memcpy()/memmove() with null pointer when length
                    argument is zero.
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: socketpair at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

In real life `memcpy(null, null, 0)` will not trigger segfault.

It will be nice not to report non-null argument problem if count is zero.

Python3.6 sources have a code, that may call memcpy with null pointer and pass
zero byte counter to that function. This is not bug.

-- 
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/20160618/5b3299e9/attachment.html>


More information about the llvm-bugs mailing list