Version française
Home     About     Download     Resources     Contact us    
Browse thread
cywgin stack overflow
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Igor Peshansky <pechtcha@c...>
Subject: Re: [Caml-list] cywgin stack overflow
On Wed, 13 Jun 2007, skaller wrote:

> On Wed, 2007-06-13 at 17:34 +1000, skaller wrote:
> > Hi, we've got a problem with an Ocaml native code program running under
> > Cygwin exiting without producing output or diagnostics. I think
> > Cygwin is running Ocaml 3.08. It was suggested
> > this was probably a stack overflow. The program is Dypgen GLR
> > parser generator, which is probably heavily recursive. It works
> > fine on my AMD64/Ubuntu Linux box, Ocaml 3.10-dev+25 or something.
> >
> > Does anyone know how to increase the stack size, or have any other
> > idea how to work around this problem? Or any idea if it could
> > be any other problem?
>
> Woops! I misdiagnosed the problem I think. I put -ccopts and
> dypgen runs fine .. however Ocamlopt.opt does not compile it
> the generated file ;(
>
> The file src/flx_parser.ml is generated by Dypgen, but ocamlopt.opt
> doesn't compile it, nor issue any diagnostic (not even returning
> with an error code). It just completes without generating a
> src/flx_parse.cmx file.
>
> Unfortunately, recompiling Ocaml on Cygwin isn't an option.
> Is there someone here maintaining the Cygwin port?

Yes.  I am.  But I haven't yet had a chance to build anything newer than
3.08.

> Any chance of 3.09 series Ocaml, and, with the native
> code compiler built with a larger stack?

I thought Ocaml had growable stacks...  I must've been confused.

Besides, I'm planning to build a 3.10 series shortly -- is there really a
pressing need for 3.09?

> I've yet to try running with larger memory for Cygwin as
> suggested by Igor -- the ml file is quite large:
>
>  20555  92221 804093 src/flx_parse.ml
>
> src/flx_parse.cmx on amd64/Ubuntu is 83569 bytes.
>
> I also suppose I can try ocamlopt (sans .opt) or even
> ocamlc (ouch!).

Do try to increase the available memory -- the amount Cygwin allocates by
default is rather small (256M, I believe).  Another possibility is to run
the compilation under strace to see why it exits.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Freedom is just another word for "nothing left to lose"...  -- Janis Joplin