How to find out which function causes Exception “Stack_overflow” in OCaml

My OCaml program prints:

Fetal error: Exception "Stack_overflow"

without any further information.

How to find out which function causes this "Stack_overflow" exception?

asked Jan 13, 2014 by anonymous

1 Answer

 
Best answer

First, recompile your OCaml program with -g.

Second, rerun your OCaml program with OCAMLRUNPARAM=b and the backtrace will be printed out after the "Stack_overflow" exception.

answered Jan 13, 2014 by anonymous

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...