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!
It seems to have ignored the backend source files which are generated by
early build steps optabgen.c, etc. Either that, or else it doesn't
realize that the arrays in those files (eg, optab1[] in optab.c) are
constant values.
Every backend report that I looked at, was a false positive caused by this.