Menu
Logged-In As
ACCOUNTNot Logged In
Fix 20+ LLVM clang static analysis defectsBRL-CAD
Status: ClosedTime to complete:
48 hrs
Mentors: Sean
This task involves running the LLVM Clang static analysis tool that reports defects in source code:
svn co https://brlcad.svn.sf.net/svnroot/brlcad/brlcad/trunk brlcad cd brlcad mkdir .build cd .build CC=clang CXX=clang++ scan-build cmake .. -DBRLCAD_BUNDLED_LIBS=ON cd src/other make -j9 cd ../../ scan-build make (may be able to use -j flag here as well, haven't tried yet) scan-build: 3147 bugs found. scan-build: Run 'scan-view /tmp/scan-build-2012-11-29-4' to examine bug reports. scan-view /tmp/scan-build-2012-11-29-4
Once you run the static analysis, fix 20 or more of the defects listed. Submit your changes as a single patch file, make sure to test compilation, and re-run the static analysis to make sure they're really fixed. See http://brlcad.org/wiki/Deuces for help getting started.
It's often easier and faster to fix entire files or types of defects at once. If you do this and find yourself spending more than a few hours, let us know and we'll consider creating additional follow-up tasks.
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
llvm_analyzer_fixes.patch | 15.9 KB | December 26 2012 04:23 UTC |
I would like to work on this task.
This task has been assigned to Cezar. You have 48 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
Cezar, roughly how long did it take to fix that many?
Congratulations, this task has been completed successfully.
Well... running `make` with `scan-build` is painful. It took about two and a half hours for 80% of the project without the docs, and I had to do it before and after the fixes. Fixing the actual errors took somewhere between two and three hours.
Thanks Cezar, that's good to know and is roughly on-par with what I estimated. The build time is something we can't account for since different hardware and build settings will greatly affect how long a compile takes.
Note that there are several other fix-clang-issues tasks if you're interested. ;)
Thanks again!