From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 2D9E7BC0A for ; Wed, 13 Jun 2007 19:15:18 +0200 (CEST) Received: from [128.93.11.101] (buzet.inria.fr [128.93.11.101]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5DHF05P004462; Wed, 13 Jun 2007 19:15:01 +0200 Message-ID: <46702583.7040704@inria.fr> Date: Wed, 13 Jun 2007 19:12:35 +0200 From: Alain Frisch User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Cc: skaller , pechtcha@cs.nyu.edu Subject: Re: [Caml-list] cywgin stack overflow References: <1181720072.23474.13.camel@rosella.wigram> <1181738340.6135.6.camel@rosella.wigram> <1181743209.6135.13.camel@rosella.wigram> <1181744198.6141.3.camel@rosella.wigram> <46701AFB.40403@inria.fr> In-Reply-To: X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46702614.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; frisch:01 frisch:01 stack:01 ocaml:01 stack:01 cygwin:01 mingw:01 ocamlopt:01 ocamlopt:01 segfault:01 cygwin:01 byterun:01 unices:01 asmrun:01 2007,:98 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). 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. -- Alain