caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Missing overflow exception message in ocamlopt
@ 2006-10-11 18:46 Jakob Lichtenberg
  2006-10-11 19:03 ` [Caml-list] " Jon Harrop
  2006-10-15 15:58 ` Xavier Leroy
  0 siblings, 2 replies; 9+ messages in thread
From: Jakob Lichtenberg @ 2006-10-11 18:46 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-10-16  3:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-11 18:46 Missing overflow exception message in ocamlopt Jakob Lichtenberg
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

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).