Bug 91631 - Clang static analysis of libtess shows undefined values and use of memory after free
Summary: Clang static analysis of libtess shows undefined values and use of memory aft...
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLU (show other bugs)
Version: git
Hardware: All All
: medium major
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 04:09 UTC by Jonathan Liu
Modified: 2019-05-13 16:11 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jonathan Liu 2015-08-14 04:09:45 UTC
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.
Comment 1 GitLab Migration User 2019-05-13 16:11:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/glu/issues/3.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.