The -cov error was caused by a string mixin. The string had more lines in it than the source file, and so there was memory corruption.

The problem is that string literals can contain an arbitrary number of lines, and those lines may have no correspondence to any source file. So what to do, what to do, to give them source/line info? My solution was to create a pseudo-filename that consisted of the source location where the mixin statement was.