From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 9D329BB81 for ; Wed, 29 Dec 2004 17:48:50 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBTGmolw009454 for ; Wed, 29 Dec 2004 17:48:50 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA20664; Wed, 29 Dec 2004 17:48:49 +0100 (MET) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBTGmncw009451; Wed, 29 Dec 2004 17:48:49 +0100 Received: from warp (chateaudeau-4-82-225-176-25.fbx.proxad.net [82.225.176.25]) by postfix4-2.free.fr (Postfix) with SMTP id 1CFA0209B9C; Wed, 29 Dec 2004 17:48:49 +0100 (CET) Message-ID: <002001c4edc6$5f2b7e90$0100a8c0@warp> From: "Nicolas Cannasse" To: "Alain Frisch" , "caml users" References: <025c01c4edab$a708d160$0100a8c0@warp> <41D2D205.5030106@inria.fr> Subject: Re: [Caml-list] Obj.dup crash ? Date: Wed, 29 Dec 2004 17:49:32 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Miltered: at nez-perce with ID 41D2DFF2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41D2DFF1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 dup:01 cannasse:01 wrote:01 dup:01 camlreturn:01 defines:01 mutable:01 argument:01 argument:01 nicolas:02 nicolas:02 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: > 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 Exact. Could this be fixed in next release ? I don't understand why it returns the argument since even with 0 fields the tag is mutable using Obj.set_tag. Regards, Nicolas