From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlc Stack_overflow
Date: Wed, 9 Aug 2006 03:54:24 +0100 [thread overview]
Message-ID: <200608090354.24786.jon@ffconsultancy.com> (raw)
In-Reply-To: <6dbd4d000608081900m267ea9d2mc0043962cd35d6f@mail.gmail.com>
On Wednesday 09 August 2006 03:00, Denis Bueno wrote:
> | $ ocamlc -g -c spit_etest.ml
> | Fatal error: exception Stack_overflow
>
> `----
>
> I really have no idea where to start, whether it's my fault or
> ocamlc's. I have included some relevant system information [1].
>
> Could someone point my in the right direction?
The OCaml compilers aren't entirely tail recursive so they sometimes overflow
the stack on large input (especially autogenerated code). Easiest fixes:
1. Use ocamlc.opt because native code gets a bigger stack.
2. Use a bigger bytecode stack, set via the environment variable CAMLRUNPARAM.
You can also get stack overflows by compiling with -rectypes and linking
without it. I assume the type checker goes into infinite non-tail
recursion...
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
next prev parent reply other threads:[~2006-08-09 11:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 1:03 Denis Bueno
2006-08-09 2:00 ` Denis Bueno
2006-08-09 2:54 ` Jon Harrop [this message]
2006-08-09 4:19 ` [Caml-list] " Martin Jambon
2006-08-09 13:41 ` Denis Bueno
-- strict thread matches above, loose matches on Subject: below --
2003-11-24 17:21 [Caml-list] Ocamlc stack overflow Alex Baretta
2003-11-24 17:47 ` Richard Jones
2003-11-25 13:19 ` Alex Baretta
2003-11-25 14:06 ` Richard Jones
2003-11-25 17:50 ` Xavier Leroy
2003-11-24 18:22 ` Damien Doligez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608090354.24786.jon@ffconsultancy.com \
--to=jon@ffconsultancy.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox