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 QAA01073 for caml-red; Wed, 16 Aug 2000 16:10:16 +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 TAA15391 for ; Mon, 14 Aug 2000 19:33:37 +0200 (MET DST) Received: from cepheus.azstarnet.com (cepheus.azstarnet.com [169.197.56.195]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e7EHXab18062 for ; Mon, 14 Aug 2000 19:33:36 +0200 (MET DST) Received: from dylan (dialup02ip009.tus.azstarnet.com [169.197.30.137]) by cepheus.azstarnet.com (8.9.3/8.9.3) with SMTP id KAA27753; Mon, 14 Aug 2000 10:33:20 -0700 (MST) X-Sent-via: StarNet http://www.azstarnet.com/ Message-ID: <009201c00616$15ce6970$210148bf@dylan> From: "David McClain" To: "Markus Mottl" , "=?iso-8859-1?Q?David_Mentr=E9?=" Cc: "Nicolas Joliot" , Subject: =?iso-8859-1?Q?Re:_Interfa=E7age_C/CAML?= Date: Mon, 14 Aug 2000 10:35:43 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: weis@pauillac.inria.fr Many thanks for pointing this error out... I had inadvertantly used the incorrect Store_... form twice on finalized structures in my bulk of code, although I have never experienced any problems from it... But just to be safe I read the message in the archives and went through by stuff to clean it up... - David -----Original Message----- From: David Mentré To: Markus Mottl Cc: Nicolas Joliot ; caml-list@inria.fr Date: Monday, August 14, 2000 9:49 AM Subject: Re: Interfaçage C/CAML >Markus Mottl writes: > >> 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. > >I would say that Store_{whatever} macros are useful for data structures >that are created in the C-world but should be managed (and destroyed) in >the OCaml-world, WITHOUT any further access on the data by the C >part. For all other cases, use the Field_{whatever} macros. With this >macro, the OCaml GC won't try to have a look at your C data structures. > >By the way, Markus has already found a bug like this in my own code. See >this message for further details on how the bug is triggered : > http://caml.inria.fr/archives/200002/msg00074.html > >I hope it helps, >d. >-- > David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/ > Opinions expressed here are only mine. >