From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH for-4.6 12/13] tools/ocaml: call libxl_dominfo_{init, dispose} in stub Date: Thu, 23 Jul 2015 09:38:02 +0100 Message-ID: <20150723083802.GI16933@zion.uk.xensource.com> References: <1437638354-14216-1-git-send-email-wei.liu2@citrix.com> <1437638354-14216-13-git-send-email-wei.liu2@citrix.com> <55B0A6AC.2000903@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZIC16-0001TV-W8 for xen-devel@lists.xenproject.org; Thu, 23 Jul 2015 08:38:13 +0000 Content-Disposition: inline In-Reply-To: <55B0A6AC.2000903@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Xen-devel , David Scott , Wei Liu , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Thu, Jul 23, 2015 at 09:32:44AM +0100, Andrew Cooper wrote: > On 23/07/2015 08:59, Wei Liu wrote: > > Signed-off-by: Wei Liu > > --- > > Cc: David Scott > > > > As far as I can tell, all Val_$foo function does deep-copy, so we can > > safely call dispose in said function. > > Sadly this is insufficient. failwith_xl() longjump()s back into the > ocaml runtime, which ends up leaking any allocations made for dominfo. > > This is a systemic problem with the Ocaml bindings and I have a proposed > solution but it involves rewriting quite a lot of this code and is > definitely not 4.6 material. > Fine then. Systematic problem requires systematic fix. Let's ignore the last two patches in this series. Wei.