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 A48D6BB84 for ; Tue, 16 May 2006 10:22:15 +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 k4G8MFd2023364 for ; Tue, 16 May 2006 10:22:15 +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 KAA22904 for ; Tue, 16 May 2006 10:22:14 +0200 (MET DST) Received: from irma.motion-twin.com (ns0.motion-twin.com [213.186.50.39]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4G8MEK4023361 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 16 May 2006 10:22:14 +0200 Received: from [82.233.72.200] (helo=[192.168.2.115]) by irma.motion-twin.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.54) id 1Ffuon-0002V8-R0; Tue, 16 May 2006 10:22:14 +0200 Message-ID: <44698B5A.5000309@motion-twin.com> Date: Tue, 16 May 2006 10:20:42 +0200 From: Nicolas Cannasse User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xavier Leroy 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> In-Reply-To: <446986DF.1070308@inria.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44698BB7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44698BB6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; cannasse:01 ncannasse:01 motion-twin:01 surprising:01 bug:01 stack:01 stack:01 segfault:01 segfault:01 compiler:01 silently:01 exited:01 ocaml:01 toplevel:01 msdn: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 >>Also, the fact that using lists crashes for the same data set is >>surprising. Is there a similar hard limit for lists, or would this be a >>bug? Should I post a test case? > > > Depends on the platform you use. In principle, Caml should report > stack overflows cleanly, by throwing a Stack_overflow exception. > However, this is hard to do in native code as it depends a lot on the > processor and OS used. So, some combinations (e.g. x86/Linux) will > report stack overflows via an exception, and others will let the > kernel generate a segfault. 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 don't care so much in my case since I'm not using C code a lot, I know for sure that any crash/early abort is indeeed a stack overflow. That might not be the case for all Win32 users. Best, Nicolas * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/key_s-z_4.asp