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.0 required=5.0 tests=none 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 6FCBFBBE1 for ; Thu, 12 Oct 2006 03:04:59 +0200 (CEST) Received: from smtp110.sbc.mail.mud.yahoo.com (smtp110.sbc.mail.mud.yahoo.com [68.142.198.209]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id k9C14vev020619 for ; Thu, 12 Oct 2006 03:04:58 +0200 Received: (qmail 23760 invoked from network); 12 Oct 2006 01:04:56 -0000 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@69.230.221.12 with plain) by smtp110.sbc.mail.mud.yahoo.com with SMTP; 12 Oct 2006 01:04:56 -0000 Message-ID: <452D949B.2030503@rftp.com> Date: Wed, 11 Oct 2006 18:04:27 -0700 From: Robert Roessler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061009 SeaMonkey/1.5a MIME-Version: 1.0 To: Caml-list Subject: Re: [Caml-list] Missing overflow exception message in ocamlopt References: <43CD2D195487A448934920501C6EDB23026B233F@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com> <200610112003.20262.jon@ffconsultancy.com> <43CD2D195487A448934920501C6EDB23026B23C3@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com> In-Reply-To: <43CD2D195487A448934920501C6EDB23026B23C3@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 452D94B9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 bug:01 ocamlopt:01 runtime:01 stack:01 byte:01 stack:01 ocaml:01 costing:98 2006:98 46,:98 wrote:01 wrote:01 lichtenberg:01 lichtenberg:01 Jakob Lichtenberg wrote: > Is this a bug in ocamlopt? No - rather, it is the ugly intrusion of reality. ;) As has been already pointed out, it isn't easy to generate code that detects this at runtime under a widely varying set of environments and conditions... to tighten it up further would likely start costing in performance (and what is ocamlopt for?). A related veiwpoint says that while you still don't understand your app's logic and control paths well enough to predict/avoid things like runaway stack usage - you use the interpreted version. THEN you switch to the ocamlopt version when you think you are ready (and be prepared to switch back if you are proven wrong). > On Wednesday 11 October 2006 19:46, Jakob Lichtenberg wrote: >> When I compile the following program as byte code I see a stack > overflow >> (expected). When using ocamlopt it seems that the program dies and I > do >> not see the expected overflow exception? > > OCaml doesn't always throw the Stack_overflow exception from native > code. On > some systems it seg faults. Robert Roessler roessler@rftp.com http://www.rftp.com