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.6 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, HTML_MESSAGE,SPF_SOFTFAIL 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 94CB0BC68 for ; Mon, 16 Oct 2006 05:56:00 +0200 (CEST) Received: from smtp.microsoft.com (smtp.microsoft.com [131.107.115.214]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k9G3twbu022836 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 16 Oct 2006 05:55:59 +0200 Received: from mailout5.microsoft.com (157.54.69.148) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server id 8.0.665.7; Sun, 15 Oct 2006 20:55:49 -0700 Received: from tuk-hub-04.redmond.corp.microsoft.com ([157.54.70.30]) by mailout5.microsoft.com with Microsoft SMTPSVC(6.0.3790.2786); Sun, 15 Oct 2006 20:55:47 -0700 Received: from TK5-EXHUB-C102.redmond.corp.microsoft.com ([157.54.70.72]) by tuk-hub-04.redmond.corp.microsoft.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Sun, 15 Oct 2006 20:55:47 -0700 Received: from win-imc-02.wingroup.windeploy.ntdev.microsoft.com (157.54.69.169) by TK5-EXHUB-C102.redmond.corp.microsoft.com (157.54.70.72) with Microsoft SMTP Server id 8.0.665.7; Sun, 15 Oct 2006 20:55:46 -0700 Received: from WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com ([157.54.62.26]) by win-imc-02.wingroup.windeploy.ntdev.microsoft.com with Microsoft SMTPSVC(6.0.3790.2786); Sun, 15 Oct 2006 20:55:46 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6F0D6.F5068FA0" Subject: RE: [Caml-list] Missing overflow exception message in ocamlopt Date: Sun, 15 Oct 2006 20:50:46 -0700 Message-ID: <43CD2D195487A448934920501C6EDB23185DAA@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Caml-list] Missing overflow exception message in ocamlopt Thread-Index: AcbwcwF38gUSxqY0ThufbX5oV26qvAAY0HFn References: <43CD2D195487A448934920501C6EDB23026B233F@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com> <45325A99.5040400@inria.fr> From: Jakob Lichtenberg To: Xavier Leroy Cc: X-OriginalArrivalTime: 16 Oct 2006 03:55:46.0180 (UTC) FILETIME=[F5A90440:01C6F0D6] X-Miltered: at concorde with ID 453302CE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 ocamlopt:01 byte:01 stack:01 stack:01 cvs:01 behaves:01 byte:01 cvs:01 behaves:01 2006:98 2006:98 tahoma:98 overflows:01 overflows:01 ------_=_NextPart_001_01C6F0D6.F5068FA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Xavier, =20 Thanks for letting me know about this. I am sorry to say that I do not = have a deep understanding of the topic, but if I am able to dig anything = up I'll let you know. =20 - Jakob ________________________________ From: Xavier Leroy [mailto:Xavier.Leroy@inria.fr] Sent: Sun 10/15/2006 8:58 AM To: Jakob Lichtenberg Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Missing overflow exception message in ocamlopt > 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? > [under Windows] Right. Given your e-mail address, you might actually understand better than I why it is so. Let me explain: The machine code generated by ocamlopt does not test explicitly for stack overflows, relying instead on the operating system to detect and report them. However, handling of stack overflow conditions varies greatly between processors and operating systems. Currently: - Under Linux/IA32 and Linux/AMD64, stack overflows are properly turned into a Stack_overflow Caml exception. Similar handling is in the CVS for MacOSX/PPC, and MacOSX/Intel might be feasible soon. - Other Unix-like operating systems just report stack overflows as a "segmentation violation" or "bus error" fatal signal. - Windows, as you noticed, behaves strangely. Stack overflows are = turned into Win32 system exceptions, but apparently the structured exception handling of Win32 just fails to handle them and silently exits the program. That might be because the stack frames generated by ocamlopt are nothing like what Win32 expects. If you happen to know how to do better under Windows, you're most welcome to let me know. - Xavier Leroy ------_=_NextPart_001_01C6F0D6.F5068FA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: [Caml-list] Missing overflow exception = message in ocamlopt=0A= =0A= =0A= =0A=
=0A=
Hi = Xavier,
=0A=
 
=0A=
Thanks for = letting me know about this. I am sorry to say that I do not have a = deep understanding of the topic, but if I am able to dig anything up = I'll let you know.
=0A=
 
=0A=
- Jakob
=0A=

=0A=
=0A= From: Xavier Leroy = [mailto:Xavier.Leroy@inria.fr]
Sent: Sun 10/15/2006 8:58 = AM
To: Jakob Lichtenberg
Cc: = caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Missing = overflow exception message in ocamlopt

=0A=
=0A=

> 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?
>  [under Windows]

Right.  = Given your e-mail address, you might actually understand
better than = I why it is so.  Let me explain:

The machine code generated = by ocamlopt does not test explicitly for
stack overflows, relying = instead on the operating system to detect and
report them.  = However, handling of stack overflow conditions varies
greatly between = processors and operating systems.  Currently:

- Under = Linux/IA32 and Linux/AMD64, stack overflows are properly
  = turned into a Stack_overflow Caml exception.  Similar handling = is
  in the CVS for MacOSX/PPC, and MacOSX/Intel might be = feasible soon.

- Other Unix-like operating systems just report = stack overflows
  as a "segmentation violation" or "bus error" = fatal signal.

- Windows, as you noticed, behaves strangely.  = Stack overflows are turned
  into Win32 system exceptions, but = apparently the structured
  exception handling of Win32 just = fails to handle them and silently
  exits the program.  = That might be because the stack frames generated
  by ocamlopt = are nothing like what Win32 expects.

If you happen to know how to = do better under Windows, you're most
welcome to let me know.

- = Xavier Leroy

------_=_NextPart_001_01C6F0D6.F5068FA0--