[llvm-bugs] [Bug 45081] New: FalsePositive: wrong assumption of equality

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 2 14:40:09 PST 2020


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

            Bug ID: 45081
           Summary: FalsePositive: wrong assumption of equality
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: eustas.ru at gmail.com
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

Created attachment 23194
  --> https://bugs.llvm.org/attachment.cgi?id=23194&action=edit
Report

Minified repro case:

uint8_t* buf = nullptr;
size_t buf_size = 0;
size_t new_buf_size = std::max(x, y + 1);
if (buf_size != new_buf_size) {
  buf = malloc(new_buf_size);
}
[[deref buf]]

-- 
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/20200302/9f3251b5/attachment.html>


More information about the llvm-bugs mailing list