Re: Flaws detected by static analyzers in Fedora 41 Critical Path Packages

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

 



On Tue, Jul 09, 2024 at 04:03:10PM -0400, David Malcolm wrote:
> On Tue, 2024-07-09 at 13:37 +0200, Siteshwar Vashisht wrote:
> > On Tue, Jul 9, 2024 at 1:16 PM Daniel P. Berrangé
> > <berrange@xxxxxxxxxx>
> > wrote:
> > 
> > > For packages I'm involved in (QEMU, libvirt), there are a huge
> > > number of
> > > reported "flaws". The false positive error reports level is way too
> > > high
> > > for me to spend time looking at these reports in any detail though.
> > > 
> > > The biggest problem is that the clang 'warning[unix.Malloc]' check
> > > doesn't
> > > understand that __attribute__((cleanup)) functions (via the glib
> > > g_autofree
> > > / g_autoptr macros) will free memory. On libvirt this accounts for
> > > 35% of
> > > all warnings list, and QEMU it accounts for about 20% of warnings.
> > > There
> > > are probably some real memory leaks there, but it is impractical to
> > > search
> > > for them amongst the noise.
> 
> I don't know about the clang analyzer, but FWIW GCC's -fanalyzer has
> code to handle __attribute__((cleanup)) and thus shouldn't have this
> issue (see e.g. upstream bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108733 ).  But there's
> certainly other bugs in -fanalyzer that it could be running into.

Yeah, in the openscanhub reports, the bogus memory leaks appear
to be from CLang rather than GCC.

> > > Another 30% are "DeadStore" warnings which, while correct, are also
> > > harmless
> > > and not something we intend to fix since this is generated code &
> > > making
> > > the
> > > generator more complex is not desired.
> > > 
> 
> Which analyzer is emitting that?

This was again CLang.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux