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 IAA10080; Tue, 12 Mar 2002 08:30:42 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA13585 for ; Tue, 12 Mar 2002 08:30:40 +0100 (MET) Received: from ns.lami.univ-evry.fr (ns.lami.univ-evry.fr [195.221.162.248]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g2C7UeX21877 for ; Tue, 12 Mar 2002 08:30:40 +0100 (MET) Received: from lami.univ-evry.fr (bio1.info.lami.univ-evry.fr [192.168.162.9]) by ns.lami.univ-evry.fr (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id IAA29505; Tue, 12 Mar 2002 08:30:34 +0100 X-Authentication-Warning: ns.lami.univ-evry.fr: Host bio1.info.lami.univ-evry.fr [192.168.162.9] claimed to be lami.univ-evry.fr Message-ID: <3C8DAE99.9040309@lami.univ-evry.fr> Date: Tue, 12 Mar 2002 08:30:33 +0100 From: Franck Delaplace Organization: BioInfo Team , LaMI EVE (UMR 8042 CNRS) User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: fr-fr MIME-Version: 1.0 To: "M E Leypold @ labnet" CC: OCAML Subject: Re: [Caml-list] Problem with ocamlopt References: <3C8C620F.6080801@lami.univ-evry.fr> <15500.42189.563370.819377@hod.void.org> Content-Type: multipart/alternative; boundary="------------010302070506080605030103" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --------------010302070506080605030103 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit > > > > PS: You will find attached the source code > >When trying to read it, one of my brain modules threw an exception: >Stack overflow. [:-)] > > Thank you to attempt to read it. You're a pioneer . What does it talk about ? :-) >Hi Franck, > >Actually I only wrote to make that joke, but to be a bit more useful: >It might be that the constructs used by the code generator you used to >translate the FA definitions into ocaml nest somewhat too deeply, and >since the ocamlcompiler parses recursive descendend (i think) its >stack overflows at some point or other. > > > >Suggestions: > > * Try cutting down your FA, let's say to half as a test case and > compile it then. Does it overflow still? > Yes it does if the code it still in a single file. If it is splitted in more than one file it is ok >If things are like I suggest, > that is should be called a tagcc bug, since there is IMHO no > reason for FA execution to use nested constructs this way > (nesting too deeply). > >Regards -- Markus > > > here another Stack overflow for a simpler program let t = [| [| (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0) |]; repeat the previous array more than 390 times .... [| (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0) |] |] ;; Now, if I split it into several different arrays but in the same file, There is also the same error. If each line is replaced by (ugly code) let t = Array.make 400 [||] ;; let i = ref 0 ;; (incr i ; t.(!i) <- [| (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0); (1,[|1 ;1;1|],1.0) |] );; There still an error I use ocamlc now which works well. Thank you for your advice. -- Franck Delaplace @w3:http://www.lami.univ-evry.fr/~delapla/ Equipe BioInfo, La.M.I-U.M.R 8042 C.N.R.S 523 Place des Terrasses 91025 Evry CEDEX (France) --------------010302070506080605030103 Content-Type: multipart/related; boundary="------------020201090803080203060008" --------------020201090803080203060008 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit
 > PS: You will find attached the source code 

When trying to read it, one of my brain modules threw an exception:
Stack overflow. :-)


Thank you to attempt to read it. You're a pioneer . What does it talk about ? :-)
Hi Franck,

Actually I only wrote to make that joke, but to be a bit more useful:
It might be that the constructs used by the code generator you used to
translate the FA definitions into ocaml nest somewhat too deeply, and
since the ocamlcompiler parses recursive descendend (i think) its
stack overflows at some point or other.


Suggestions:

* Try cutting down your FA, let's say to half as a test case and
compile it then. Does it overflow still?
Yes it does if the code it still in a single file.
If it is splitted in more than one file it is ok


        
If things are like I suggest,
that is should be called a tagcc bug, since there is IMHO no
reason for FA execution to use nested constructs this way
(nesting too deeply).

Regards -- Markus



here another Stack overflow for a simpler program

let t = [| 
  [|
 (1,[|1 ;1;1|],1.0);
    (1,[|1 ;1;1|],1.0);
    (1,[|1 ;1;1|],1.0);
    (1,[|1 ;1;1|],1.0)
  |];
repeat the previous  array more than 390 times  ....

[|
(1,[|1 ;1;1|],1.0);
(1,[|1 ;1;1|],1.0);
(1,[|1 ;1;1|],1.0);
(1,[|1 ;1;1|],1.0)
|]

|] ;;

Now, if I split it into several  different arrays but in the same file, There is also the same error.
If each line is replaced by (ugly code)
let t = Array.make 400 [||] ;;
let i = ref 0 ;;

(incr i ; t.(!i) <-
[|
(1,[|1 ;1;1|],1.0);
(1,[|1 ;1;1|],1.0);
(1,[|1 ;1;1|],1.0);
(1,[|1 ;1;1|],1.0)
|] );;

There still an error
I use ocamlc now which works well.
Thank you for your advice.

-- Franck Delaplace @w3:http://www.lami.univ-evry.fr/~delapla/ Equipe BioInfo, La.M.I-U.M.R 8042 C.N.R.S 523 Place des Terrasses 91025 Evry CEDEX (France)
--------------020201090803080203060008 Content-Type: image/gif; name="Drafts" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="Drafts" R0lGODlhEwATAKIAAP//AMzMAGZmAP8zAAAAAP///wAAAAAAACH5BAEAAAUALAAAAAATABMA AANVWLrUTisyEoC1oUlFr8dQRHykFRad+Y0gdzlv86KVKdsskOUAjHu312rFK5GCRWDMJDAC BKxGrTcFXTIo4CPY41QJgzAP69IWT14nWSL97DaiLVqRAAA7 --------------020201090803080203060008-- --------------010302070506080605030103-- ------------------- 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