From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 34771BB84 for ; Fri, 19 May 2006 19:13:28 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4JHDRkp028830 for ; Fri, 19 May 2006 19:13:27 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA25205 for ; Fri, 19 May 2006 19:13:27 +0200 (MET DST) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4JHDQVk028827 for ; Fri, 19 May 2006 19:13:26 +0200 Received: from [192.168.1.2] (che78-2-82-237-71-191.fbx.proxad.net [82.237.71.191]) by smtp1-g19.free.fr (Postfix) with ESMTP id 18E289AAA7; Fri, 19 May 2006 19:13:26 +0200 (CEST) Message-ID: <446DFCB5.20303@inria.fr> Date: Fri, 19 May 2006 19:13:25 +0200 From: Xavier Leroy User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nicolas Cannasse Cc: akalin@akalin.cx, caml-list@inria.fr Subject: Re: [Caml-list] Array 4 MB size limit References: <20060515141230.ajyupn2z28k0484s@horde.akalin.cx> <446986DF.1070308@inria.fr> <44698B5A.5000309@motion-twin.com> In-Reply-To: <44698B5A.5000309@motion-twin.com> X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 446DFCB7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 446DFCB6.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; stack:01 segfault:01 compiler:01 silently:01 exited:01 stack:01 ocaml:01 toplevel:01 ocaml's:01 api:01 caml-list:01 overflows:01 exception:01 msvc:01 msvc:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 >> [Stack overflow in ocamlopt-generated code] > A segfault will happen on Windows/MSVC port. I also found some cases > where the commandline program (the haXe compiler in that case) just > silently exited on Stack Overflow (exit code was not 0 but no error or > "program error" infamous message box was displayed). > > I think that there is some MSVC specific C extension for catching such > stack overflows (__try / __except*). It would be nice to have such a > handling at the ocaml toplevel that would at least exit with a > meaningful error message. I'm aware of __try/__finally, but a bit of experimentation suggested that it doesn't play nice with OCaml's exception handling. There is a lower-level API whose name I cannot remember that might be usable within Caml, but I didn't pursue this. Windows users are welcome to contribute suggestions or code. - Xavier Leroy