caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jakob Lichtenberg <jakobl@windows.microsoft.com>
To: <caml-list@yquem.inria.fr>
Subject: Missing overflow exception message in ocamlopt
Date: Wed, 11 Oct 2006 11:46:14 -0700	[thread overview]
Message-ID: <43CD2D195487A448934920501C6EDB23026B233F@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]

Using ocaml-3.09.3-win-msvc

 

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?

 

>type overflow.ml

let array_1=Array.make 229376 42;;

let _ = Printf.printf "A\n";;

flush stdout;;

 

let array_2=Array.make 32768 43;;

let _ = Printf.printf "B\n";;

flush stdout;;

 

let list_1 = Array.to_list(array_1);;

let _ = Printf.printf "C\n";;

flush stdout;;

 

let list_2 = Array.to_list(array_2);;

let _ = Printf.printf "D\n";;

flush stdout;;

 

let list_3 = list_1@list_2;;

let _ = Printf.printf "E\n";;

flush stdout;;

 

>ocamlc overflow.ml -o overflow_ocamlc.exe

>overflow_ocamlc.exe

A

B

C

D

Fatal error: exception Stack_overflow

 

>echo %ERRORLEVEL%

2

 

>ocamlopt overflow.ml -o overflow_ocamlopt.exe

>overflow_ocamlopt.exe

A

B

C

D

 

>echo %ERRORLEVEL%

-1073741819

 

Is this a bug?

 

Thanks,

 

-          Jakob Lichtenberg

 

 


[-- Attachment #2: Type: text/html, Size: 10760 bytes --]

             reply	other threads:[~2006-10-11 18:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11 18:46 Jakob Lichtenberg [this message]
2006-10-11 19:03 ` [Caml-list] " Jon Harrop
2006-10-11 19:17   ` Richard Jones
2006-10-11 19:25     ` Gerd Stolpmann
2006-10-11 20:26     ` Jon Harrop
2006-10-11 19:45   ` Jakob Lichtenberg
2006-10-12  1:04     ` Robert Roessler
2006-10-15 15:58 ` Xavier Leroy
2006-10-16  3:50   ` Jakob Lichtenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43CD2D195487A448934920501C6EDB23026B233F@WIN-MSG-21.wingroup.windeploy.ntdev.microsoft.com \
    --to=jakobl@windows.microsoft.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).