From: Sven LUTHER <luther@maxime.u-strasbg.fr>
To: Manuel Fahndrich <maf@microsoft.com>,
"'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: OCaml - CInterface: interesting bug scenario
Date: Mon, 31 May 1999 12:11:23 +0200 [thread overview]
Message-ID: <19990531121123.A20994@maxime.u-strasbg.fr> (raw)
In-Reply-To: <783D93998201D311B0CF00805FEAA07B7E8DD2@RED-MSG-42>; from Manuel Fahndrich on Thu, May 27, 1999 at 02:58:18PM -0700
On Thu, May 27, 1999 at 02:58:18PM -0700, Manuel Fahndrich wrote:
> The scenario looks like a rare event, but I was able to observe this bug
> consistently. There are several fixes one can imagine:
>
> 1) keep ML and C blocks separate throughout the lifetime of a process.
>
> 2) Box every C pointer inside an abstract ML block. This way, the garbage
> collector will never look at the pointer. Unfortunately this causes a lot of
> extra allocation and indirection.
>
> 3) Tag C pointers as integers by setting the least significant bit whenever
> the pointer is passed to ML or stored in the ML heap. Similarly, clear the
> bit whenever the pointer is examined on the C side.
Another solution would be to wrap the malloc and other such functions, to
inform the caml system that the block as been freed, would it not ?
Friendly,
Sven LUTHER
prev parent reply other threads:[~1999-06-01 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-27 21:58 Manuel Fahndrich
1999-05-31 10:11 ` Sven LUTHER [this message]
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=19990531121123.A20994@maxime.u-strasbg.fr \
--to=luther@maxime.u-strasbg.fr \
--cc=caml-list@inria.fr \
--cc=luther@dpt-info.u-strasbg.fr \
--cc=maf@microsoft.com \
/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