[mercury-users] notify of recursion depth exceeded (stack overflow)

Vladimir Gubarkov xonixx at gmail.com
Thu Oct 7 04:02:03 AEDT 2010


Hi, dear ALL

If we compile mercury source with default settings (simple mmc file.m) then
in case of stack overflow program will silently exit (with no error at all
(at least at win), i believe that this is because stack overflow happens on
C-level).
On the other side if compiling with stseg grade then program will hang with
a lot of memory consumed. My question is - is there some compile options to
have descriptive error like: "Stack overflow at pred some_pred: recursion
limit 1000 reached" or smth like this.
This helps to make more obvious wrong logic of program as it is obvious that
if recusion is too big, it's most likely wrong way of solving some problem.
Maybe I missed this infomation from manual, if so - please point me to right
place.

Sincerely yours,
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20101006/ba0a8d85/attachment.html>


More information about the users mailing list