[llvm-bugs] [Bug 45059] New: Fails to notice a variable can only be zero, so a reported null pointer dereference can't happen

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 28 06:56:40 PST 2020


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

            Bug ID: 45059
           Summary: Fails to notice a variable can only be zero, so a
                    reported null pointer dereference can't happen
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: christian.morales.vega at gmail.com
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

As reported in https://github.com/Tencent/rapidjson/issues/1651 the clang
Static Analyzer reports an issue in a very simple, two lines, RapidJSON
program.

AFAICT when it does "allocators.h:205:13: note: Assuming 'originalPtr' is not
equal to null" it's making an error (fails to see a constrain). If chunkHead_
is NULL, then originalPtr must also have been NULL.

-- 
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/20200228/51f3eb4c/attachment-0001.html>


More information about the llvm-bugs mailing list