From: David.Mentre@irisa.fr (David Mentré)
To: Markus Mottl <mottl@miss.wu-wien.ac.at>
Cc: Nicolas Joliot <Nicolas.Joliot@irisa.fr>, caml-list@inria.fr
Subject: Re: Interfaçage C/CAML
Date: 11 Aug 2000 10:58:47 +0200 [thread overview]
Message-ID: <wd8em3wrx6g.fsf@parate.irisa.fr> (raw)
In-Reply-To: Markus Mottl's message of "Thu, 10 Aug 2000 19:14:04 +0200"
Markus Mottl <mottl@miss.wu-wien.ac.at> 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.
next prev parent reply other threads:[~2000-08-14 16:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-10 16:05 Nicolas Joliot
2000-08-10 17:14 ` Markus Mottl
2000-08-11 8:24 ` Xavier Leroy
2000-08-11 10:54 ` Markus Mottl
2000-08-11 8:58 ` David Mentré [this message]
2000-08-14 17:35 David McClain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wd8em3wrx6g.fsf@parate.irisa.fr \
--to=david.mentre@irisa.fr \
--cc=Nicolas.Joliot@irisa.fr \
--cc=caml-list@inria.fr \
--cc=mottl@miss.wu-wien.ac.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox