[Mesa-dev] [Bug 109231] [nir] src/compiler/nir/nir_loop_analyze.c uninitialized variable

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jan 6 13:39:01 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=109231

            Bug ID: 109231
           Summary: [nir] src/compiler/nir/nir_loop_analyze.c
                    uninitialized variable
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: oschowa at web.de
        QA Contact: mesa-dev at lists.freedesktop.org

When compiling a release build of a Mesa driver which uses nir and configured
with
'meson -D buildtype=release -D b_ndebug=true ...' gcc 8.2.1 generate this
warning:

[69/241] Compiling C object
'src/compiler/nir/068b2c8@@nir at sta/nir_loop_analyze.c.o'.
../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/compiler/nir/nir_loop_analyze.c:
In function ‘process_loops’:
../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/compiler/nir/nir_loop_analyze.c:270:55:
warning: ‘alu_op’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
                if (alu->src[0].src.ssa == alu_srcs[0] &&
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    alu->src[1].src.ssa == alu_srcs[1] &&
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
                    alu->op == alu_op) {
                    ~~~~~~~~~~~~~~~~~                   
../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/compiler/nir/nir_loop_analyze.c:255:20:
note: ‘alu_op’ was declared here
             nir_op alu_op;


There indeed seems to be a comparison with an uninitialized variable. A debug
build does not trigger this warning.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190106/38ca180a/attachment.html>


More information about the mesa-dev mailing list