Broken ghc-7.0.3/vector combination?
Daniel Fischer
daniel.is.fischer at googlemail.com
Wed Apr 20 17:02:50 CEST 2011
Investigating the appearance of NaN in criterion's output, I found that
NaNs were frequently introduced into the resample vectors when the
resamples were sorted.
Further investigation of the sorting code in vector-algorithms revealed no
bugs there, and if the runtime was forced to keep a keen eye on the
indices, by replacing unsafeRead/Write/Swap with their bounds-checked
counterparts or by 'trace'ing enough of their uses, the NaNs did not
appear.
I could not reproduce the behaviour with ghc-7.0.1 (using exactly the same
versions of the involved libraries), ghc-7.0.2 (different criterion
release, the other libraries identical) or unoptimised compilation with
7.0.3 (no NaNs encountered in some 100+ testruns with varying input).
So, is it possible that some change in ghc-7.0.3 vs. the previous versions
caused a bad interaction between ghc-optimisations and vector fusion
resulting in bad vector reads/writes?
More information about the Glasgow-haskell-users
mailing list