103 points · by nequo · 4y ago · 37 comments
This looks to have a pretty straightforward fix hopefully.
In the space of miscompilation bugs this seems pretty easy to catch. A pretty nasty one happened in ghc 7.6/7.8 , where the register allocator didn’t realize float and double registers were the same registers, so code that mixed the type had total garbage!
It's obvious to add regression tests for this and related issues now that they've been found. And great! That's what regression tests are for. But testing is always going to be fundamentally incomplete in that it can only cover non-obvious things after they've already been encountered.
"CCall testsuite doesn't test `signed` arguments and results. This would have helped catch [a previous ghc regression on aarch64]".
It is time to ask if GHC itself has become too complicated.
I don't understand how a bug in GHC has blown up more than any bug in any recent GCC or clang - probably because the bug reporter decided that hyperbole was going to be their tool of choice instead of behaving like an adult.
It's a nasty bug, but in reality it isn't some P0 monstrosity despite how "eXtReMeLy aLaRmInG" it seems.
It didn't blow up more or less than bugs in other language implementations. When there are serious bugs in GCC, LLVM the JVM, etc. it always goes to HN's front page.
It isn't time to ask that question though. At least, I don't think so and I've been using GHC Haskell for a decade now and for many different commercial use-cases to boot.
GHC is complex, perhaps too complex. I don't track GHC closely but it seems GHC does seem to suffer from more than a fair share of embarrassing compilation bugs. This feeling is derived anecdotally so I may be wrong. Happy to be corrected.
Someone more conversant with GHC will have to chime in and agree/disagree. Don't let your love of Haskell get in the way of providing an objective opinion :-)