Re: Static analysis

2023-05-20 Thread Sam Price
ppcheck from source to get access to the > --project flag. > i ran > bear ./waf > and then > cppcheck --project=compile_commands.json > > It returned a few static analysis errors if interested. > I'll attach the results when it finishes running. > It is possible I don&#x

Re: Static analysis

2023-05-15 Thread Sam Price
^ cpukit/libblock/src/bdbuf.c:396:3: warning: Uninitialized variable: q [uninitvar] q->avl.left = q->avl.right = NULL; ^ cpukit/libblock/src/bdbuf.c:361:12: note: Assuming condition is false while (p != NULL) ^ cpukit/libblock/src/bdbuf.c:396:3: note: Uninitialized variabl

Re: Static analysis

2023-05-15 Thread Sam Price
Thanks Alex, I was able to run cppcheck. I had to install the newest cppcheck from source to get access to the --project flag. i ran bear ./waf and then cppcheck --project=compile_commands.json It returned a few static analysis errors if interested. I'll attach the results when it fin

Re: Static analysis

2023-05-15 Thread Joel Sherrill
Not sure if this helps but here is the script used to run Coverity https://github.com/joelsherrill/rtems-cron-helpers/blob/main/rtems-run-coverity On Mon, May 15, 2023, 10:03 AM Alex White wrote: > You should be able to use `bear` (https://github.com/rizsotto/Bear). I > have it installed via my

Re: Static analysis

2023-05-15 Thread Alex White
You should be able to use `bear` (https://github.com/rizsotto/Bear). I have it installed via my package manager. After a `./waf clean`, run `bear -- ./waf` to generate compile_commands.json. Then you should be able to run `cppcheck --project=compile_commands.json`. Alex

Static analysis

2023-05-04 Thread Sam Price
I was trying to run scan-build on a microblaze build. However scan-build wasn't seeing any files get built. I then tried to revert down to the intercept-build command, and it generated an empty compilation database. /usr/share/clang/scan-build-py-10/bin/intercept-build --override-compiler ./waf Is

Re: [PATCH] score: Help static analysis

2023-01-28 Thread Joel Sherrill
This only impacts one file and the change is precise so the short log should be more specific. Otherwise ok. I hope this makes it happy. On Sat, Jan 28, 2023, 3:59 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Add an assert to _Thread_Initialize_scheduler_and_wait_nodes() whi

[PATCH] score: Help static analysis

2023-01-28 Thread Sebastian Huber
Add an assert to _Thread_Initialize_scheduler_and_wait_nodes() which may help a static analyzer. Use a do/while loop since we have at least one scheduler. Update #4832. --- cpukit/score/src/threadinitialize.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cpukit/score

Re: Static Analysis Tools for RTEMS

2022-06-14 Thread Joel Sherrill
On Mon, Jun 13, 2022, 8:38 PM Chris Johns wrote: > On 10/6/2022 12:09 am, Joel Sherrill wrote: > > With Matthew addressing new warnings from GCC 12, > > I have posted some warning fixes for the arm and aarch64. They let those > archs > build warning free without the testsuite. I hope it helps. >

Re: Static Analysis Tools for RTEMS

2022-06-13 Thread Chris Johns
On 10/6/2022 12:09 am, Joel Sherrill wrote: > With Matthew addressing new warnings from GCC 12, I have posted some warning fixes for the arm and aarch64. They let those archs build warning free without the testsuite. I hope it helps. Chris ___ devel mai

Static Analysis Tools for RTEMS

2022-06-09 Thread Joel Sherrill
Hi With Matthew addressing new warnings from GCC 12, I thought it would be good to remind everyone that the RTEMS Project has access to two static analysis tools. As you work, fix bugs/warnings, etc., please remember to look at the results for the area of code you are touching from the static

Re: [PATCH v2] score: Define _Assert() for static analysis runs

2021-02-01 Thread Gedare Bloom
ity. > > Define RTEMS_STATIC_ANALYSIS if a static analysis run by Coverity is > performed. > --- > cpukit/include/rtems/score/assert.h | 4 ++-- > cpukit/include/rtems/score/basedefs.h | 11 +++ > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/cpuk

[PATCH v2] score: Define _Assert() for static analysis runs

2021-01-31 Thread Sebastian Huber
The goal is to reduce false positive NULL_RETURNS, PW.NORETURN_FUNCTION_DOES_RETURN, PW.SET_BUT_NOT_USED, UNUSED_VALUE, etc. issues produced by Coverity. Define RTEMS_STATIC_ANALYSIS if a static analysis run by Coverity is performed. --- cpukit/include/rtems/score/assert.h | 4 ++-- cpukit

Re: clang static analysis of leon2

2020-04-20 Thread Joel Sherrill
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 s

Re: clang static analysis of leon2

2020-04-20 Thread suyash singh
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

Re: clang static analysis of leon2

2020-04-20 Thread Joel Sherrill
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 scor

clang static analysis of leon2

2020-04-20 Thread suyash singh
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@rtems.org http://lists.rtems.org/mailman/listinfo/devel

clang static analysis for at697f

2020-04-20 Thread suyash singh
Find all the reports here https://drive.google.com/drive/folders/1FL_euXfAtlzezDf0Vwg5-WHM22z8lbFQ?usp=sharing There is a problem in /src/rtems/bsps/shared/grlib/btimer/tlib_ckinit.c with LEON3_IrqCtrl_Regs->timestamp[0] being undeclared ___ devel mailin

Re: Review for my GSOC proposal: Static analysis integration

2020-03-08 Thread suyash singh
Thanks I have added now. On Mon, Mar 9, 2020 at 11:00 AM Vaibhav Gupta wrote: > > > On Mon, Mar 9, 2020, 10:40 AM suyash singh > wrote: > >> Please review my proposal. Thank you >> >> This project is inspired by https://devel.rtems.org/ticket/3710 and from >> the mail thread with subject >> "Im

Re: Review for my GSOC proposal: Static analysis integration

2020-03-08 Thread Vaibhav Gupta
On Mon, Mar 9, 2020, 10:40 AM suyash singh wrote: > Please review my proposal. Thank you > > This project is inspired by https://devel.rtems.org/ticket/3710 and from > the mail thread with subject > "Improve Coverity Scan Integration: GSOC project details" > > > https://docs.google.com/document/d

Review for my GSOC proposal: Static analysis integration

2020-03-08 Thread suyash singh
Please review my proposal. Thank you This project is inspired by https://devel.rtems.org/ticket/3710 and from the mail thread with subject "Improve Coverity Scan Integration: GSOC project details" https://docs.google.com/document/d/1OerM8Iix7PbDUCyb_J_KEzcMgLbvdqxd4FnK_BqI7XI/edit?usp=sharing ___

Fwd: GCC static analysis branch now available on Compiler Explorer

2019-12-10 Thread Joel Sherrill
This looks like something we should consider using as well as clang's checks. -- Forwarded message - From: David Malcolm Date: Tue, Dec 10, 2019, 9:47 AM Subject: GCC static analysis branch now available on Compiler Explorer To: For the adventurous/curious, my static ana

Re: Static Analysis for RTEMS

2015-03-27 Thread Joel Sherrill
On 03/27/2015 09:33 AM, abd el-hamed Amer wrote: Dear All, First i thank Dr. joel for his advice in my last e-mail about this project. I already submitted a proposal. So please review it and I would be happy to hear your comments. I repeated my comments from the mailing list and added more.

Static Analysis for RTEMS

2015-03-27 Thread abd el-hamed Amer
Dear All, First i thank Dr. joel for his advice in my last e-mail about this project. I already submitted a proposal. So please review it and I would be happy to hear your comments. Title: " Stack Analysis for RTEMS" Best Regards, Abd elhamid ___ deve

Re: Static Analysis for RTEMS

2015-03-26 Thread Joel Sherrill
On 03/26/2015 04:23 AM, abd el-hamed Amer wrote: Dear Dr. Joel sherrill & All, I have chosen static analysis of stack usage for RTEMS, and I working now on my proposal. can you advice me about the latest work on this topic and which parts see it's important to focus in? This i

Static Analysis for RTEMS

2015-03-26 Thread abd el-hamed Amer
Dear Dr. Joel sherrill & All, I have chosen static analysis of stack usage for RTEMS, and I working now on my proposal. can you advice me about the latest work on this topic and which parts see it's important to focus in? Best Regards, Ab