Clang static analysis results for dmd

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Jul 24 14:29:36 PDT 2011


On 7/24/11 4:06 PM, Robert Clipsham wrote:
> Hi all,
>
> I took the liberty of running dmd through clang's static analysis, and
> it's turned up quite a few (486) potential bugs in dmd:
>
> http://octarineparrot.com/assets/dmd/
>
> There's bound to be a few false positives in there (please feel free to
> report them to the nice folk over at llvm), and the dead code won't
> cause any problems (and most of the "dead code" in the backend is
> probably in use with dmc or something), but there are still a few
> hundred potential crashes in there.

Very interesting. I selected randomly one of each category and found 
only false positives though, mostly because the tool does not understand 
that assert(p) will subsequently guarantee p is non-null, and assert(0) 
terminates the program.

Andrei



More information about the Digitalmars-d mailing list