Le 9/4/2005, "Thursday" <nospam / nospam.nospam.nospam.nospam.org> a
ρΔrit:
>It would be nice if Rubyforge or RAA would auto-analyze source code for
>common errors like memory leaks (unfreed pointers) using tools such as:
>
>1. Gimpel pc-lint
>2. Parasoft c++test
>
>Since they are static code-analysis tools, they can be automated more
>easily/safely than say, runtime tools such as valgrind or Glowcode.
>
>Lets approach both Gimpel and Parasoft--then ask them if they'd be
>willing to provide a license to analyze c/c++ ruby code in exchange for
>recognition of their donation to the ruby community on RAA and
>Rubyforge.  See which vendor offers a better deal (not just in price,
>but in licensing/usage terms--maybe they can run the analysis on their
>machines every night (or week) so they don't even have to give away a
>copy of the tool).
>
>Even if they approve this for only ruby 1.8.x and fcgi 0.x, it would
>still be very timesaving.
>
>It is very useful to have an automated tool go thru all the source code
>and point out memory leaks or code that breaks published recommendations
>(effective c++ books, misra2, etc).  And simply clicking on these alerts
>will take you directly to the code so you can review & edit.
>
>Any takers?  Seems crazy not to try given the win/win for all involved.

The problem is that, due to the structure of ruby programs (or
ruby itself), certain errors are very difficult to spot and many
things will cause false positives, for example with memory since
there is a garbage collector involved.

I do not know how well even commercial products would deal with that,
but otherwise it may not be a bad idea. Often, though, compiling
with the highest settings and using lint + valgrind yields similar
results.

E

--
No-one expects the Solaris POSIX implementation!