From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id F1951BC57 for ; Wed, 26 May 2010 03:16:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiMEAPMS/EvZSMDddWdsb2JhbACeGxUBFyAFH8A0hRME X-IronPort-AV: E=Sophos;i="4.53,300,1272837600"; d="scan'208";a="51828267" Received: from fmmailgate01.web.de ([217.72.192.221]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 May 2010 03:16:28 +0200 Received: from smtp07.web.de ( [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id 3073915BC965D; Wed, 26 May 2010 03:16:28 +0200 (CEST) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OH5ES-0007t2-00; Wed, 26 May 2010 03:16:28 +0200 Received: from mrvn by frosties.localdomain with local (Exim 4.71) (envelope-from ) id 1OH5ER-00030G-Kf; Wed, 26 May 2010 03:16:27 +0200 From: Goswin von Brederlow To: Romain Beauxis Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Bigarrays and blocking_section.. References: <201005251125.21755.toots@rastageeks.org> <201005251511.41565.toots@rastageeks.org> Date: Wed, 26 May 2010 03:16:27 +0200 In-Reply-To: <201005251511.41565.toots@rastageeks.org> (Romain Beauxis's message of "Tue, 25 May 2010 15:11:41 -0500") Message-ID: <87hblv5uok.fsf@frosties.localdomain> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX19hdNbc2OCgXRzHa3tWtpT7Hb18N58b0vqF4NMJ GIxIiizlFZnPfl4S14HfXsOhQmLF7XldS2NXVlcTfbGaBielXO e3VRQt89Y= X-Spam: no; 0.00; bigarrays:01 bigarray:01 struct:01 buffer:01 segfaults:01 stderr:01 bigarray:01 28,:98 mfg:98 caml-list:01 writes:01 caml:02 caml:02 blocking:04 size:95 Romain Beauxis writes: > Hi ! > > Le mardi 25 mai 2010 14:29:28, vous avez écrit : >> Are you sure that you correctly calculate the bigarray size in your >> Caml code? Why not just use struct caml_ba_array fields? I suspect >> it's not GC problem but just a buffer overrun in memset(). > > I'm pretty sure the size is not the problem. There may be another origin for > the segfaults, though, but I would like to know if my assumption that I can > release the global lock under the mentioned condition is correct.. > > > Romain Yes you can. So I too suspect you get the size wrong or something. But it should be easy to test. In frame_of_value() print the values to stderr and run it before and after a GC.compact. You may want to allocate and forget some stuff before creating the bigarray to make sure it moves. When you see the bigarray itself move but all the other frame values remain constant you have shown it works. MfG Goswin