Browse thread
[Caml-list] stack overflow
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | John Max Skaller <skaller@o...> |
| Subject: | Re: [Caml-list] stack overflow |
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