[mercury-users] segfaults with message mentioning infinite recursion

Peter Moulder pmoulder at csse.monash.edu.au
Sat Mar 29 10:22:55 AEDT 2003

In a moment of frustration, I added the following to a paper:

\item \tool\ is written principally in Mercury.
In the default compilation grade of Mercury, there is a fixed limit
on how big the stack and heap can grow.
These limits can be increased from their default values with
environment variables,
but finding values high enough is a matter of trial-and-error:
if the debugger crashes, then randomly increase the settings and try
again.  This is annoying.

There are other compilation grades that do not have this limitation,
though they are not yet stable enough for our use (as at Mercury
0.11.0).

I'd like to check the accuracy of that before submitting.  E.g. I don't
know whether the fixed heap size is relevant to these segfaults, and I
haven't done too much experimentation with what crashes and what
doesn't.

Perhaps the "infinite recursion" error message should be changed to suggest
increasing some of these limits.  Perhaps the default sizes should be a
function of the machine's available memory.  Some people have lines like

export MERCURY_OPTIONS='--heap-size 200000 --detstack-size 300000'

in their .profile, which seems wrong.

Is it correct that the --high-level grade and .net/java grades and asm
grades don't have this limitation?  The "not stable enough" observation
was with --high-level, though it's been a while since I've tried that;
I can have another go and try to submit a bug report if people are
interested.

pjm.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au