From: Alex Baretta <alex@baretta.com>
To: Richard Jones <rich@annexia.org>
Cc: Ocaml <caml-list@inria.fr>,
Jacques Garrigue <caml-bugs@pauillac.inria.fr>
Subject: Re: [Caml-list] Ocamlc stack overflow
Date: Tue, 25 Nov 2003 14:19:49 +0100 [thread overview]
Message-ID: <3FC356F5.9080309@baretta.com> (raw)
In-Reply-To: <20031124174743.GA30052@redhat.com>
Thanks for answering.
I finally managed to fix my mail client. I haven't been able to get
anything from the list yesterday..
Richard Jones wrote:
> 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:
I am also trying to compile an auto-generated file, but it is rather
small (140 lines of code). The binary search is probably not the way to
go, but let me see what happens if I try to increase the stack size...
> export OCAMLRUNPARAM=l=16M
OK, done that...
ocamlc is presently running with 98% of the cpu and some 70 MB of memory
footprint. It's almost certainly looping somewhere, allocating it's head
off...
Damien Doligez wrote:
> On Monday, November 24, 2003, at 06:21 PM, Alex Baretta wrote:
>
> If you are using the CVS version, you should try to update to the
> latest one. One version was committed last week with a stack
> overflow problem.
>
> -- Damien
I am using the Xavier-patch 2 to ocaml-3.07. I'm not ehntusiastic about
using CVS. Since my company uses ocaml as it's main language for
developing commercial applications, I'd prefer to have a stable stock
version. After all the turmoil around 3.07, a stable bugfix release is
overdue now.
***
Let try to produce a backtrace for the list...
OK, so the standard ocamlc is compiled without debugging info. Let me
tweak the Makefile, so that I can build a copy of ocamlc with the -g option.
Done that. Here's the command I'm using to run the debugger:
[alex@flyingtuxman anagrafiche]$ ocamldebug
/opt/ocaml/3.07+2g/bin/ocamlc -I
/opt/ocaml/3.07/lib/ocaml/site-lib/postgres -I
/opt/ocaml/3.07/lib/ocaml/site-lib/cgi -I
/home/alex/cvs/sw2/ocamllib-addons -I /home/alex/cvs/sw2/unixlib-addons
-I /home/alex/cvs/sw2/rules-engine -I
/home/alex/cvs/sw2/xcaml/xcaml-lib -I /home/alex/cvs/sw2/dbinterface
-I /home/alex/cvs/sw2/freerp/db/db_access -I
/home/alex/cvs/sw2/freerp/lib -I
/home/alex/cvs/sw2/freerp/business_rules -I /home/alex/cvs/sw2/dbschema
-I /home/alex/cvs/sw2/freerp/db/xcaml_db_schema -I
/home/alex/cvs/sw2/xcaml/xcaml-lib -c inserimento_enti_sql.ml
Objective Caml Debugger version 3.07+2
(ocd) run
Loading program... done.
Time : 2766617
Program end.
Uncaught exception: Stack_overflow
(ocd) prev
Time : 2766616 - pc : 824648 - module Errors
No source file for Errors.
(ocd) bt
#0 Pc : 824648 Errors char 2807
#1 Pc : 68568 Format char 35089
#2 Pc : 830376 Main char 5649
#3 Pc : 834284 Main char 5678
************
Now what?
Alex
-------------------
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
next prev parent reply other threads:[~2003-11-25 13:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-24 17:21 Alex Baretta
2003-11-24 17:47 ` Richard Jones
2003-11-25 13:19 ` Alex Baretta [this message]
2003-11-25 14:06 ` Richard Jones
2003-11-25 15:10 ` [Caml-list] Ocamlc stack overflow (Probably a typechecking bug) Alex Baretta
2003-11-25 17:50 ` [Caml-list] Ocamlc stack overflow Xavier Leroy
2003-11-24 18:22 ` Damien Doligez
2006-08-04 1:03 ocamlc Stack_overflow Denis Bueno
2006-08-09 2:00 ` Denis Bueno
2006-08-09 2:54 ` [Caml-list] " Jon Harrop
2006-08-09 4:19 ` Martin Jambon
2006-08-09 13:41 ` Denis Bueno
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=3FC356F5.9080309@baretta.com \
--to=alex@baretta.com \
--cc=caml-bugs@pauillac.inria.fr \
--cc=caml-list@inria.fr \
--cc=rich@annexia.org \
/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