Version française
Home     About     Download     Resources     Contact us    
Browse thread
Obj.dup crash ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <Alain.Frisch@i...>
Subject: Re: [Caml-list] Obj.dup crash ?
Nicolas Cannasse wrote:
> let test() =
>     let a = Obj.new_block 0 0 in
>     let b = Obj.dup a in
>     Gc.major()
> ;;

Because the function caml_obj_dup returns directly the argument
when it has size 0. I guess it should use CAMLreturn and not return, 
because it defines local variables with CAMLlocal.

-- Alain