sherpa is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/sherpa does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 9 years ago

Last modified 8 years ago

#363 new task

Fix "bugs" found by static code analysis — at Version 3

Reported by: Enrico Bothmann Owned by: Frank Siegert
Priority: minor Milestone: perfect
Component: Hadron Decays Version: 0.trunk
Keywords: Cc:

Description (last modified by anonymous)

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.

I dump records here:

http://physik2.uni-goettingen.de/~ebothmann/sherpa

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)
  • AMEGIC++: Steffen
  • HADRONS++: FrankS
  • PHASIC++/Decays: FrankS
  • 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.

Change History (3)

comment:1 Changed 9 years ago by Frank Siegert

Description: modified (diff)

Hi Enrico,

thanks for the code analysis results. I'll take care of HADRONS++ and PHASIC++/Decays.

Cheers, Frank

comment:2 Changed 9 years ago by anonymous

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 anonymous

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/

Note: See TracTickets for help on using tickets.