From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D073A7EE35 for ; Mon, 2 May 2016 10:27:56 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.24,566,1454972400"; d="scan'208";a="176402546" Received: from pl-59055.paris.inria.fr (HELO pl-59055.rocqadm.inria.fr) ([128.93.64.92]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 02 May 2016 10:27:56 +0200 Received: from shindere by pl-59055.rocqadm.inria.fr with local (Exim 4.87) (envelope-from ) id 1ax9Cu-00018c-FV for caml-list@inria.fr; Mon, 02 May 2016 10:27:56 +0200 Date: Mon, 2 May 2016 10:27:56 +0200 From: =?utf-8?Q?S=C3=A9bastien?= Hinderer To: caml-list@inria.fr Message-ID: <20160502082756.GC1971@pl-59055.rocqadm.inria.fr> Mail-Followup-To: caml-list@inria.fr References: <1461935860.9915.100.camel@e130.lan.sumadev.de> <5630123afc948279fc61d5e4c35d9014@in.tum.de> <1461939917.9915.110.camel@e130.lan.sumadev.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1461939917.9915.110.camel@e130.lan.sumadev.de> Subject: Re: [Caml-list] Obj.out_of_heap_tag, out of minor heap or memory corruption? Hi, Gerd Stolpmann (2016/04/29 16:25 +0200): > Am Freitag, den 29.04.2016, 16:14 +0200 schrieb Markus Weißmann: > > The value comes from C bindings, but from a string-value via Char.code. > > It is then passed through a constructor-function to create the record; > > I added a check there to see if the C bindings are to blame: > > Well, there are other types of errors in C bindings that could also > cause this. Imagine what happens when the C bindings do not properly > handle pointers (e.g. do not declare them as local roots), and an > outdated pointer to an int is followed by the GC because of this. > Because the minor GC moves values to the major heap, this could cause > that the int is overwritten then. > > In my experience, it's always the C binding! > > Unfortunately, there's no code for investigations. Do you think there is room for improvement at this level? Do you already have a bit more precise ideas about the kind of tools that coould be helpful? Cheers, Sébastien.