From: John Max Skaller <skaller@ozemail.com.au>
To: Yang Shouxun <yangsx@fltrp.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] stack overflow
Date: Mon, 14 Apr 2003 01:42:15 +1000 [thread overview]
Message-ID: <3E998557.60703@ozemail.com.au> (raw)
In-Reply-To: <200304091010.37547.yangsx@fltrp.com>
Yang Shouxun wrote:
> Dear OCaml users,
>
> I've written a modified version of C4.5 program in OCaml. However, when the
> input is big, say over 50000, the program (native code on Debian) died for
> stack overflow. Otherwise, it runs as expected.
>
> Can anybody explain possible reasons causing stack overflow in OCaml?
Which version of Ocaml?
For Linux, there is no way a tiny dataset like 50,000 elements
could cause a stack overflow .. unless you're running an accounting
package which limits the stack/memory of a process you get ALL
of virtual memory for your stack.
Yet I had this problem, and it turned out to be
a code generation bug in Ocaml 3.03/4. That problem
has been fixed in 3.05.
The diagnostic I got, by the way, was not 'stack overflow'
but 'out of memory' when the stack really did overflow:
in my case non-tail recursive lexing was easy to make
blow the stack with a 7 Meg file: it took minutes to
dump, and the disk thrashed a lot .. the mouse froze ..
and i couldn't kill the process :(
If you are not getting these symptoms, it isn't a stack
overflow. [I am, of course, talking about the i86 native
code compiler]
--
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850
-------------------
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-04-13 17:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-09 2:10 Yang Shouxun
2003-04-09 2:19 ` brogoff
2003-04-09 2:45 ` Yang Shouxun
2003-04-09 8:14 ` Markus Mottl
2003-04-09 9:23 ` Yang Shouxun
2003-04-09 11:34 ` Markus Mottl
2003-04-10 4:12 ` Parallel CPS? (was Re: [Caml-list] stack overflow) Yang Shouxun
2003-04-10 4:58 ` Mike Lin
2003-04-09 14:14 ` CPS folds " Neel Krishnaswami
2003-04-09 16:54 ` brogoff
2003-04-09 17:23 ` Mike Lin
2003-04-09 2:43 ` [Caml-list] stack overflow David Brown
[not found] ` <200304091034.45256.yangsx@fltrp.com>
[not found] ` <16019.34434.468479.586884@barrow.artisan.com>
2003-04-09 2:53 ` Yang Shouxun
2003-04-09 6:45 ` David Monniaux
2003-04-13 15:42 ` John Max Skaller [this message]
2006-03-31 20:44 Stack_overflow mulhern
2006-03-30 23:03 ` [Caml-list] Stack_overflow Jon Harrop
2006-03-31 21:38 ` Eric Cooper
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=3E998557.60703@ozemail.com.au \
--to=skaller@ozemail.com.au \
--cc=caml-list@inria.fr \
--cc=yangsx@fltrp.com \
/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