Opened 9 years ago
Last modified 8 years ago
#363 new task
Fix "bugs" found by static code analysis
Reported by: | Enrico Bothmann | Owned by: | Frank Siegert |
---|---|---|---|
Priority: | minor | Milestone: | perfect |
Component: | Hadron Decays | Version: | 0.trunk |
Keywords: | Cc: |
Description (last modified by )
Static analysis finds dead code and potential bugs by walking through every possible code path. As some code paths are never used during the run, these bugs mostly are false-positives.†
Still I think it's worthwhile and a concrete measure to improve the code quality/legibility and sometimes even performance/memory efficiency to use these analysis reports.
The latest analysis results (r29475) are:
http://www2.ph.ed.ac.uk/~ebothman/sherpa/scan-build-2017-01-16/ (last update: 16-Jan-2016)
My suggestion is that each of us looks through and fixes the bugs at least in the module she/he is responsible for, following the discussion at the meeting in Dresden.
- CSShower++/MCatNLO: eno (done)
- PDF: eno (done)
- SHERPA/Initialization, SHERPA/Single_Events, SHERPA/Main: eno (done)
- BEAM: eno (done)
- AMEGIC++: Steffen (1st iteration done)
- ATOOLS: Steffen (done)
- HADRONS++: FrankS (done)
- PHASIC++/Decays: FrankS (done)
- Rest of PHASIC++: Stefan (maybe, cf. his comment)
- METOOLS, COMIX, DIRE: Stefan
- AddOns/Higgs: Stefan
- ...
Maybe you can quickly drop a comment here if you (intent to) clean a module in this way, to prevent work duplication.
† static analysis heeds "assert" statements. E.g. a "dereference of null pointer" bug can be "fixed" by a line like "assert(ptr != NULL)", which also more explicitly states the intent of the developer and leads to more expressive crashes if not met.
Attachments (0)
Change History (11)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
Hi Enrico,
I'll take care of METOOLS, COMIX, DIRE and AddOns/Higgs. If noone else volunteers I can do the rest of PHASIC++.
Cheers Stefan
comment:3 Changed 9 years ago by
Description: | modified (diff) |
---|
Hi all, I've uploaded a new report (r27112), we are down from 269 "bugs" to 190:
http://physik2.uni-goettingen.de/~ebothmann/sherpa/scan-build-r27112-2016-01-13/
comment:4 Changed 9 years ago by
Description: | modified (diff) |
---|
Hi there,
AMEGIC and ATOOLS done.
Steffen
comment:5 Changed 9 years ago by
Description: | modified (diff) |
---|
HADRONS++ and Decays are done. Thanks eno for the updated analysis!
comment:6 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:7 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:8 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:9 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:10 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:11 Changed 8 years ago by
Description: | modified (diff) |
---|
Hi Enrico,
thanks for the code analysis results. I'll take care of HADRONS++ and PHASIC++/Decays.
Cheers, Frank