Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Troubles with marshaled/unmarshaled exception
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eric C. Cooper <ecc@c...>
Subject: Re: [Caml-list] Troubles with marshaled/unmarshaled exception
On Thu, Dec 04, 2003 at 07:11:51PM +0100, Alex Baretta wrote:
> Artem Prisyznuk wrote:
> >Hello,
> >
> >I found strange behavior of pattern matching of
> >marshaled/unmarshaled exception.
> >
> >Next code describe problem:
> >
> >    let e = Failure "test";;
> >    let e' = Marshal.from_string (Marshal.to_string e []) 0;;
> >    let print_fun exc =
> 
> 
> It seems to work alright on 3.07+2.
> 
> Here's my session:
> 
> 
>         Objective Caml version 3.07+2
> 
> 
> # let e = Failure "test";;
> val e : exn = Failure "test"
> # let e' : exn = Marshal.from_string (Marshal.to_string e []) 0;;
> val e' : exn = Failure "test"
> # e = e';;
> - : bool = true

But something is indeed broken.  Here's a slight variant of the above:

        Objective Caml version 3.07+2

# let e = Failure "test";;
val e : exn = Failure "test"
# let e' = Failure "test";;
val e' : exn = Failure "test"
# let e'' =  Marshal.from_string (Marshal.to_string e []) 0;;
val e'' : 'a = <poly>
# e'' ^ "good-bye";;
Segmentation fault

-- 
Eric C. Cooper          e c c @ c m u . e d u

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners