Don wrote:
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.
The link above is rather slow - if anyone wants a local copy to work
with let me know and I'll see about getting one to you... The
compressed source to those pages is ~206MB, it's about 2.8GB without
compression!
Here's a clang bug:
http://octarineparrot.com/assets/dmd/report-vtxpYt.html#EndPath
3436 if (!exp)
<9> Taking false branch
3437 fd->nrvo_can = 0;
3438
3439 if (exp)
<10> Taking false branch
3440 {
That is, (!exp) is false, and (exp) is also false.
Another one:
http://octarineparrot.com/assets/dmd/report-bksOGf.html#EndPath
Quite bizarre -- it seems to think the static member array
Type::sizeTy[TMAX] is a null pointer.
I finally found one genuine DMD bug report:
http://d.puremagic.com/issues/show_bug.cgi?id=6389
But it looks to me as though the reports show more bugs in clang, than
in DMD.