clang static analysis of leon2

Joel Sherrill joel at rtems.org
Mon Apr 20 18:35:01 UTC 2020


Don't necessarily dive into reformatting or scraping anything. It is just
an idea.

There are multiple sides to analysis tools. Running them, having useful
reports, automating the run, being able to flag false reports, and getting
people to fix things.

Fixing things can be a path of no return. I see things in this report that
I swear Coverity has reported and I thought I looked at fixing. But the
code looks the same so I must just remember thinking about the fix. :)

On Mon, Apr 20, 2020 at 1:12 PM suyash singh <suyashsingh234 at gmail.com>
wrote:

> I can't find any way to group by sub directories but
> I can write a script/program to make a new html file in which errors are
> grouped by sub directories. I have written web scrapers with organized data
> output in python and JS before.
>
> There is a --disable-checker option and using comments to ignore parts of
> file. I have not tested both techniques yet.
>
> Some of the reports look easy to fix but the issue is that I am not
> usually sure about the previous programmer's intention for writing the code
> that way.
>
> The goal of my GSOC is to
> integrate the clang static analyzer in rtems
> and
> integrate UBSan in rtems
>
> I would also like to improve the buildbot if needed
>
> On Mon, Apr 20, 2020 at 11:00 PM Joel Sherrill <joel at rtems.org> wrote:
>
>> I could download the report and look through it.
>>
>> I assume that's the standard output from the analyzer.  For prioritization
>> of looking at issues, it can be helpful if there is a way to group them by
>> "area" which usually corresponds to the subdirectory. My scan showed
>> one for a chain method in score/src. I think adding one line of code would
>> fix that.
>>
>> But I also saw one in calloc.c which I think would need to be marked as
>> a false report. calloc() is supposed to return a pointer so it isn't a
>> leak.
>> Is there a way to tell the analyzer to ignore that specific issue in that
>> method?
>>
>> Have you looked through the reports for things that look legitimate
>> and easy to fix?
>>
>> I'm unsure of the scope of your GSoC project so not sure other than
>> to say I looked through it quickly and was able to see the issues reported
>> after I unzipped the report.
>>
>> Is the goal to get this integrated into the RTEMS.org buildbot?
>>
>> --joel
>>
>> On Mon, Apr 20, 2020 at 12:14 PM suyash singh <suyashsingh234 at gmail.com>
>> wrote:
>>
>>> Find the analysis here
>>> https://drive.google.com/drive/folders/1FL_euXfAtlzezDf0Vwg5-WHM22z8lbFQ
>>>
>>> steps here
>>> https://github.com/suyashsingh234/rtems-notes
>>> _______________________________________________
>>> devel mailing list
>>> devel at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200420/70191ede/attachment.html>


More information about the devel mailing list