When I try to compile a program with ocamlopt, the following exception is raised Uncaught exception: Stack overflow How can I do to avoid it . The program has been automatically generated. (by tagcc www.lami.univ-evry.fr/~delapla/tagcc/) And it contains a weighted finite state automata . Here the command line bio1:~/Tagcc>ocamlopt -o annotation -ccopt "-O" -noassert -unsafe -I bin/ bin/curses.o bin/libtagcc.cmxa annotation.ml -cclib lncurses Uncaught exception: Stack overflow Thank you PS: You will find attached the source code -- Franck Delaplace @w3:http://www.lami.univ-evry.fr/~delapla/ Equipe BioInfo, La.M.I-U.M.R 8042 C.N.R.S 523 Place des Terrasses 91025 Evry CEDEX (France)