GCC 11 and Static Analysis

Joel Sherrill joel at rtems.org
Fri Jan 29 13:15:13 UTC 2021


On Fri, Jan 29, 2021, 6:49 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Hello Matthew,
>
> On 29/01/2021 10:14, Matthew J Fletcher wrote:
> > Hi,
> >
> > Does RTEMS trunk roughly follow GCC releases ?,. i've seen discussion
> > of GCC 11 on the dev mailing list.
> you can already try out the GCC 11 based tools with the experimental
> RTEMS 7 tool chain available in the RSB.
> >
> > I wonder if we (RTEMS users) could take advantage of the new static
> > analysis options in GCC 11.
> >
> >
> https://developers.redhat.com/blog/2021/01/28/static-analysis-updates-in-gcc-11/
> > <
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelopers.redhat.com%2Fblog%2F2021%2F01%2F28%2Fstatic-analysis-updates-in-gcc-11%2F&data=04%7C01%7Cmatthew.fletcher%40se.com%7Cb41c34faa0154d5137e908d8c42830b3%7C6e51e1adc54b4b39b5980ffe9ae68fef%7C0%7C0%7C637475024180771568%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=SmQ4xfLBvYSeQUx0xd0jKC2z%2F89gRLH6IrHg17EJmUI%3D&reserved=0>
>
> >
> >
> >
> > Would seem very useful for embedded projects where runtime analysis is
> > difficult.
> Yes, you can give it a try. I never used it myself. The Coverity scan
> alone keeps me busy.
>

Agreed. I had privately chatted with Gedare about this. He and some
students had planned to or have looked at llvm's analyzer but this should
be an easy step.

The question on all these types analysis tools is how to manage the output.
As a project, we do Coverity runs on leon3 for consistency. BSP doesn't
matter for you if you want to pick at issues. But if it has warnings now,
this will only increase the number.

And it would be nice to think in terms of having automated reports
available for the community and a scoreboard of some sort to track progress.

But honestly, I've been reporting on warnings and analysis issues for
years. Sometimes filing tickets. Sometimes fixing. It is an endless quest
and hard to get broad help.

In fairness, issues in common code gets fixed. Issues in random device
drivers can tend to linger.

Please experiment and report.

--joel



> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210129/9de05090/attachment.html>


More information about the users mailing list