No subject

Fri Sep 2 19:57:00 CEST 2011

"""GHC's inliner can be persuaded into non-termination using the
standard way to encode recursion via a data type...
We have never found another class of programs, other than this
contrived one, that makes GHC diverge, and fixing the problem would
impose an extra overhead on every compilation. So the bug remains

There are now three more examples, at least two of which weren't 'contrived':

It took me about 4-6 hours to track down this bug in my own code
(#5448) since it required repeatedly bisecting a larger program until
I had a small testcase.  In the test program, I can get around it with
{-# NOINLINE funcEq #-}.  In the program it came from, though, FuncEq
is an imported value, so I have to either compile with -O0, or change
put the pragma in the imported library, where it will effect a fair
amount of code that /doesn't/ hit this bug.

If adding the check is too expensive, can the inliner have a
configurable recursion bount (ala -fcontext-stack)?

-Ron Alford

More information about the Glasgow-haskell-users mailing list