Coverity update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Taking Eric's suggestion from:

https://www.redhat.com/archives/libvir-list/2013-January/msg01050.html

There's two changes that have yet to be reviewed:

https://www.redhat.com/archives/libvir-list/2013-January/msg00537.html
https://www.redhat.com/archives/libvir-list/2013-January/msg00541.html

After this recent set of 10 patches there are about 20 patches
remaining. With the 2 above and the 10 from yesterday, the coverity
defect list stands at 236 (down from 297). Of those, about 50 are
related to a sdt.h macro issue, 50 are false positives requiring a
comment change, and another 95 can be fixed/resolved by a very simple
(but yet unnecessary) change to src/esx/esx_vi.c and
src/esx/esx_vi_types.c. Each module as a __TEMPLATE__FREE() macro which
does the following:

        item=*ptrptr;        \
                             \
        _body                \
                             \
        VIR_FREE(*ptrptr);   \

Coverity has a hard time with the VIR_FREE(*ptrptr) here and in other
modules, thus it decides we must be leaking. No amount of tagging
completely removes all the warnings (I tried adding them everywhere and
only reduced the count, not eliminated). There is a solution, but I
really don't like it.  If the VIR_FREE(*ptrptr) is changed to:

        VIR_FREE(item);      \
        *ptrptr = NULL;      \

Coverity is happy. I asked about this on a Coverity community message
board, but no one has an answer. I even generated a small program which
replicated the issue. In a way I think it could be a Coverity bug, but
I'm not sure I want to make that claim yet.

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]