English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2003-11-24 (17:47)
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. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - 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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners