<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - False positive "Assigned value is garbage or undefined""
   href="https://bugs.llvm.org/show_bug.cgi?id=44036">44036</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>False positive "Assigned value is garbage or undefined"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dcoughlin@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nils.judzinsky@igd-r.fraunhofer.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22830" name="attach_22830" title="output of clang-static-analyzer">attachment 22830</a> <a href="attachment.cgi?id=22830&action=edit" title="output of clang-static-analyzer">[details]</a></span>
output of clang-static-analyzer

The clang analyzer complains that garbage is assigned to the variable
valueLower in line 71. In my opinion, this is impossible. Line 30 and 69
contain checks that halfNumCheckpoints is not 0. So line 71 cannot be a
division by 0. valueLower is (allowed to be) 0. Given n != 0, 0/n == 0 , which
is not undefined.

Note that clang analyzer does not complain when lines 57-67 are commented out.
This is strange, as they have no effect on the computation in line 71.

clang-static-analyzer was run on Ubuntu 18.04 LTS. The exact version is in
index.html. OpenCV is required to build the program.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>