From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA13772 for caml-red; Mon, 14 Aug 2000 18:36:24 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA15992 for ; Fri, 11 Aug 2000 10:24:49 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e7B8Olv10040; Fri, 11 Aug 2000 10:24:47 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA16063; Fri, 11 Aug 2000 10:24:47 +0200 (MET DST) Message-ID: <20000811102447.47236@pauillac.inria.fr> Date: Fri, 11 Aug 2000 10:24:47 +0200 From: Xavier Leroy To: Markus Mottl , Nicolas Joliot Cc: caml-list@inria.fr Subject: Re: =?iso-8859-1?Q?Interfa=E7age_C=2FCAML?= References: <3992D2D9.906E0BA7@irisa.fr> <20000810191404.A21178@miss.wu-wien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <20000810191404.A21178@miss.wu-wien.ac.at>; from Markus Mottl on Thu, Aug 10, 2000 at 07:14:04PM +0200 Sender: weis@pauillac.inria.fr > [French> > > Si je le comprends bien, le problem c'est l'utilisation du > "Store_double_field". La solution dans ce cas serait d'essayer le macro > "Double_field" en place de l'autre macro. > > C'est souvant un source des erreurs - peut-etre on pourrait changer le nom > de "Store_double_field"? Il me semble que la plupart des programmeurs > soient confuses par "Store"... > > "Store_..." ne doit etre utilise que avec des "blocs structures", ou il > sont obligatoirs. > [English] > > It seems that a common bug has struck again: using "Store_{whatever}" in > C-interfaces is only allowed (and then mandatory) with structured blocks. > Using it for anything else may crash the GC. No, no, no! Store_field can only be used (and is mandatory) for structured blocks (with tag < No_scan_tag), but Store_double_field can be used (and is mandatory) for blocks with tag Double_array_tag. (If you do Double_field(array, n) = d, you'll run into alignment problems on some platforms, e.g. the Sparc and Mips.) So, Nicolas's code seems correct in this respect. Nicolas: could you please send to caml@inria.fr (and not to caml-list) a complete program that reproduces the crash? There's not enough details in your message to understand what goes wrong. - Xavier Leroy