Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Ocamlc stack overflow
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Ocamlc stack overflow
On Mon, Nov 24, 2003 at 06:21:07PM +0100, Alex Baretta wrote:
> I am experiencing stack overflows while compiling a source file with 
> ocamlc. Why in world should ocamlc overflow? How can I diagnose the problem?

We had this when compiling some OLE code (auto-generated ML). The
workaround was to increase the stack size:


As for diagnosing the problem: I imagine the following would work:

(1) Chop your file in half around the 50% mark. (Don't chop in the
middle of a statement, or somewhere which would cause an error).

(2) If that compiles successfully, then repeat, but chopping at the
75% mark. Otherwise if it fails, repeat chopping at the 25% mark.

(3) Continue like so doing a binary search until you find out where it

In the OLE case it appeared to crash simply because of the size of the
file, rather than any specific OCaml statement.


Richard Jones.
Merjis Ltd. - improving website return on investment
"One serious obstacle to the adoption of good programming languages is
the notion that everything has to be sacrificed for speed. In computer
languages as in life, speed kills." -- Mike Vanier

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: