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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id D61C0BC0A for ; Thu, 14 Jun 2007 09:03:13 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5E73C33022869 for ; Thu, 14 Jun 2007 09:03:13 +0200 Received: by nz-out-0506.google.com with SMTP id s1so402369nze for ; Thu, 14 Jun 2007 00:03:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=pFCfHzpZ4voAfKBvFscRnES2K+qCFl/dLKoTIGC1kCW0r6gvr/fzJFxSRhCKTrHYWrOFUG9f7NJg0/aKsIyK8CaD9LllSsyX+GHfLzAffsdxyZO3H5YAz2+VsSQ/RvAdaNc2vmyDQrjKD9OukKzeZLXMKyQoQkWoncNR8T1zZLw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=oB0Ceoov9OzmpiM7J74VQmw7qa4rumRzs8apTXCDyaZxbf8LLpOLSLMSMQEQvlXKpE9mwxxED6Lk135zWqC5JUdeU9Axf8VZ7n4EgAFkdvwF1R7XkYnDz1TjqBL3m+cJ8kwjoPft5+G1CLLenxdPwFPbZW6VBt7gEXsQlA62aYc= Received: by 10.114.168.1 with SMTP id q1mr1532422wae.1181804592338; Thu, 14 Jun 2007 00:03:12 -0700 (PDT) Received: by 10.114.60.1 with HTTP; Thu, 14 Jun 2007 00:03:12 -0700 (PDT) Message-ID: <95513600706140003j15a87440s36c71dfeb7f77c2c@mail.gmail.com> Date: Thu, 14 Jun 2007 09:03:12 +0200 From: "Olivier Andrieu" Sender: oandrieu@gmail.com To: "Alain Frisch" Subject: Re: [Caml-list] cywgin stack overflow Cc: caml-list@yquem.inria.fr, skaller , pechtcha@cs.nyu.edu In-Reply-To: <46702583.7040704@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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> <46702583.7040704@inria.fr> X-Google-Sender-Auth: 2e9f0e119323836d X-Miltered: at discorde with ID 4670E830.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 stack:01 frisch:01 frisch:01 ocaml:01 stack:01 cygwin:01 mingw:01 ocamlopt:01 ocamlopt:01 segfault:01 cygwin:01 byterun:01 unices:01 On 6/13/07, Alain Frisch 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