I've run LLVM's scan-build static analyzer on the various Apertium
dependencies: http://apertium.projectjj.com/apt/scan-build/
Fixing the bugs is beyond me as I don't know the code well enough, but I
figured I'd show you all how much these tools find.
Apertium:
http://apertium.projectjj.com/apt/scan-build/lttoolbox/ has 2 serious items.
http://apertium.projectjj.com/apt/scan-build/apertium/ has 15 serious items.
http://apertium.projectjj.com/apt/scan-build/apertium-lex-tools/ is almost
clean.
Foma:
http://apertium.projectjj.com/apt/scan-build/foma/ has 11 serious items.
HFST:
http://apertium.projectjj.com/apt/scan-build/hfst/ has 66 serious items.
Basically, dead assignments and increments aren't serious, but they are
potentially wasting a few CPU cycles. The rest is serious stuff that may
crash programs.
How to replicate on Debian or Ubuntu:
- Install the clang package
- Use scan-build as prefix for all configure and make processes, e.g.
"scan-build ./autogen.sh && scan-build make -j5"
- Open up the generated /tmp/scan-build-*/index.html file in your favorite
browser.
I recommend running scan-build after every feature commit for C++ and C
projects, and certainly before each release, and fixing everything it finds.
Also, compiling with clang++ -Wall -Wextra will show many many warnings of
potentially serious bugs that really should be fixed.
-- Tino Didriksen
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff