From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id EAA01184; Wed, 9 Apr 2003 04:19:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA01181 for ; Wed, 9 Apr 2003 04:19:51 +0200 (MET DST) Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h392JnX21680 for ; Wed, 9 Apr 2003 04:19:49 +0200 (MET DST) Received: (qmail 5939 invoked by uid 36130); 9 Apr 2003 02:19:48 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 9 Apr 2003 02:19:48 -0000 Date: Tue, 8 Apr 2003 19:19:48 -0700 (PDT) From: brogoff@speakeasy.net To: Yang Shouxun cc: "caml-list@inria.fr" Subject: Re: [Caml-list] stack overflow In-Reply-To: <200304091010.37547.yangsx@fltrp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; brogoff:01 caml-list:01 000,:01 implicitly:01 shouxun:01 bug:01 faq:01 beginner's:01 beginners:01 bin:01 compiler:01 caml-bugs:01 ocaml:01 caml:01 speakeasy:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The most likely explanation is that you created a very large list, say of length over 50_000, and tried to apply some non-tail-recursive operation to it, perhaps even implicitly. There was a very recent thread on this topic. The second explanation is that you wrote some (non-tail) recursive function and it blew the stack. If you switch to the bytecode compiler and run with stack trace, you'll find out pretty quickly. -- Brian On Wed, 9 Apr 2003, 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? > > Thanks for your time! > shouxun > > ------------------- > 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 > ------------------- 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