From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p61BnPEs031483 for ; Fri, 1 Jul 2011 13:49:25 +0200 X-IronPort-AV: E=Sophos;i="4.65,457,1304287200"; d="scan'208";a="97796856" Received: from chercheur-120.msr-inria.inria.fr (HELO [10.0.1.3]) ([193.55.250.120]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 01 Jul 2011 13:49:20 +0200 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: Damien Doligez In-Reply-To: Date: Fri, 1 Jul 2011 13:49:19 +0200 Content-Transfer-Encoding: 7bit Message-Id: <77C1708E-F0E9-4630-BDA5-9B81C51DC5B1@inria.fr> References: To: Caml List X-Mailer: Apple Mail (2.1084) Subject: Re: [Caml-list] GC interface question On 2011-07-01, at 11:09, Dmitry Bely wrote: > Does this fragment violate GC interface rules: > > Begin_roots_block(_varg, 2) > _varg[0] = ((struct camlidl_intf *) this)->caml_object; > _varg[1] = camlidl_alloc_small(1, Abstract_tag); > Field(_varg[1], 0) = (value) log; > End_roots(); > _vres = caml_callbackN_exn(caml_get_public_method(_varg[0], > Val_int(1007700946)), 2, _varg); > > It's unsafe to pass _varg to caml_callbackN_exn when it is not > referenced from local_roots, right? You're right, this code looks buggy. -- Damien