From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BB0C7BC29 for ; Wed, 9 Aug 2006 06:19:52 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k794Jq55019249 for ; Wed, 9 Aug 2006 06:19:52 +0200 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 GAA03178 for ; Wed, 9 Aug 2006 06:19:51 +0200 (MET DST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k794Jlfs015637 for ; Wed, 9 Aug 2006 06:19:51 +0200 Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 9569AD94CE2; Wed, 9 Aug 2006 00:19:46 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by frontend3.internal (MEProxy); Wed, 09 Aug 2006 00:19:46 -0400 X-Sasl-enc: tE/VqculwPDbC2Ap6HAAVrfZikwu/0egjTzMSu+w4kht 1155097186 Received: from adsl-75-16-136-183.dsl.sndg02.sbcglobal.net (adsl-75-16-136-183.dsl.sndg02.sbcglobal.net [75.16.136.183]) by mail.messagingengine.com (Postfix) with ESMTP id 37E8C216C; Wed, 9 Aug 2006 00:19:45 -0400 (EDT) Date: Tue, 8 Aug 2006 21:19:38 -0700 (PDT) From: Martin Jambon X-X-Sender: martin@droopy To: Denis Bueno Cc: OCaml Mailing List Subject: Re: [Caml-list] ocamlc Stack_overflow In-Reply-To: <6dbd4d000608081900m267ea9d2mc0043962cd35d6f@mail.gmail.com> Message-ID: References: <6dbd4d000608031803t77350a23jf388479cad9098eb@mail.gmail.com> <6dbd4d000608081900m267ea9d2mc0043962cd35d6f@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-j-chkmail-Score: MSGID : 44D96263.000 on concorde : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44D96268.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44D96263.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlc:01 stack:01 ocamlc:01 stack:01 compiler:01 externally:01 runtime:01 1977:98 2006,:98 wrote:01 caml-list:01 exception:01 functions:01 functions:01 jambon:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.3 On Tue, 8 Aug 2006, Denis Bueno wrote: > [I tried sending this a few days ago with a rather large attachment. > Since it hasn't been approved since then, I'm sending it again, sans > attachment.] > > All-- > > The source file available on my website [2] gives the following output > (when uncompressed, of course): > > ,---- > | $ 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? You are using a huge list, and it is likely that the compiler uses some functions which will use stack space proportionally to the size of your list. You can use one of the following options: - use ocamlc.opt instead of ocamlc - increase the maximum size of the stack: env OCAMLRUNPARAM=l=10M ocamlc -c spit_etest.ml - store your data externally Note that your program itself might have the same problem at runtime if you use non-tail-call optimized functions like List.map (see documentation for module List). Martin -- Martin Jambon, PhD http://martin.jambon.free.fr