caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Olivier Andrieu" <oandrieu@nerim.net>
To: "Alain Frisch" <Alain.Frisch@inria.fr>
Cc: caml-list@yquem.inria.fr, skaller <skaller@users.sourceforge.net>,
	pechtcha@cs.nyu.edu
Subject: Re: [Caml-list] cywgin stack overflow
Date: Thu, 14 Jun 2007 09:03:12 +0200	[thread overview]
Message-ID: <95513600706140003j15a87440s36c71dfeb7f77c2c@mail.gmail.com> (raw)
In-Reply-To: <46702583.7040704@inria.fr>

On 6/13/07, Alain Frisch <Alain.Frisch@inria.fr> wrote:
> Igor Peshansky wrote:
> > On Wed, 13 Jun 2007, Alain Frisch wrote:
> >> FYI, OCaml does not implement stack detection under Cygwin in native
> >> code (contrary to MSVC and Mingw ports), so the difference of behavior
> >> between ocamlopt and ocamlopt.opt is not suprising.  (I guess you get
> >> the equivalent of a segfault with ocamlopt.opt, but maybe nothing is
> >> printed.)
> >
> > In that case there should be a ocamlopt.opt.exe.stackdump somewhere...
> >
> > On a different note, why doesn't it?  Is there a special Cygwin flag that
> > disables that code?  Is the mechanism any different than on Linux?
>
> The technique to catch stack overflow is specific to the system. For
> Win32, it is implemented in byterun/win32.c (for unices, stack detection
> is implemented in asmrun/signals_asm.c). As far as I understand, win32.c
> is not used by the Cygwin port (which is considered as a Unix for the
> build process).

Indeed.

> I don't know whether the stack detection code in win32.c
> would work for Cygwin, but I don't see any reason why I wouldn't.

actually it doesn't work because Cygwin installs its own top-level
exception handler and it does mysterious things. You'd have to work
around it so that the ocaml one can do its job.

-- 
  Olivier


      reply	other threads:[~2007-06-14  7:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13  7:34 skaller
2007-06-13 11:29 ` [Caml-list] " Igor Peshansky
2007-06-13 12:05   ` skaller
2007-06-13 12:39 ` skaller
2007-06-13 13:44   ` Igor Peshansky
2007-06-13 14:00     ` skaller
2007-06-13 14:16       ` skaller
2007-06-13 14:45         ` Igor Peshansky
2007-06-13 16:20           ` Xavier Leroy
2007-06-13 16:27         ` Alain Frisch
2007-06-13 17:08           ` Igor Peshansky
2007-06-13 17:12             ` Alain Frisch
2007-06-14  7:03               ` Olivier Andrieu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95513600706140003j15a87440s36c71dfeb7f77c2c@mail.gmail.com \
    --to=oandrieu@nerim.net \
    --cc=Alain.Frisch@inria.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=pechtcha@cs.nyu.edu \
    --cc=skaller@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).