<html>
    <head>
      <base href="https://bugs.freedesktop.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 - Clang static analysis of libtess shows undefined values and use of memory after free"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91631">91631</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang static analysis of libtess shows undefined values and use of memory after free
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>GLU
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>net147@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using static analyzer included in clang 3.6.2:
$ ./autogen.sh 
$ ./configure
$ scan-build make
  CC       src/libtess/dict.lo
  CC       src/libtess/geom.lo
  CC       src/libtess/memalloc.lo
  CC       src/libtess/mesh.lo
  CC       src/libtess/normal.lo
src/libtess/normal.c:112:6: warning: Assigned value is garbage or undefined
  v1 = minVert[i];
     ^ ~~~~~~~~~~
src/libtess/normal.c:113:6: warning: Assigned value is garbage or undefined
  v2 = maxVert[i];
     ^ ~~~~~~~~~~
2 warnings generated.
  CC       src/libtess/priorityq.lo
  CC       src/libtess/render.lo
  CC       src/libtess/sweep.lo
src/libtess/sweep.c:779:11: warning: Use of memory after it is freed
    if( ! regUp->dirty ) {
          ^~~~~~~~~~~~
src/libtess/sweep.c:803:10: warning: Use of memory after it is freed
          eLo = regLo->eUp;
                ^~~~~~~~~~
src/libtess/sweep.c:808:10: warning: Use of memory after it is freed
          eUp = regUp->eUp;
                ^~~~~~~~~~
3 warnings generated.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>