Version française
Home     About     Download     Resources     Contact us    
Browse thread
Missing overflow exception message in ocamlopt
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] Missing overflow exception message in ocamlopt
Am Mittwoch, den 11.10.2006, 20:17 +0100 schrieb Richard Jones:
> On Wed, Oct 11, 2006 at 08:03:20PM +0100, Jon Harrop wrote:
> > 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.
> 
> Does it _ever_ throw a Stack_overflow in native code??  I've never
> seen it.

Sometimes. Depends on the platform and how well-debugged the ocaml
runtime for the platform is. This is quite tricky because you need to
catch the segfault (that always happens), switch to an alternate stack,
and then unwind the original stack.

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------