From: "François Bobot" <francois.bobot@cea.fr>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] memory corruption with Weak.t in Gc.finalise
Date: Mon, 14 Mar 2016 17:44:28 +0100 [thread overview]
Message-ID: <56E6EA6C.8090605@cea.fr> (raw)
In-Reply-To: <20160314103240.GA21595@frosties>
On 14/03/2016 11:32, Goswin von Brederlow wrote:
>
> Still using 4.02. This is a new thing.
>
> Still Weak.t needs to interact cleanly with the Gc. Guessing at the
> internal state of Weak.t is bad. Let's fix this for 4.03.
I think it is already fixed for 4.03. The new GC phase named "clean", between mark and sweep, makes
the behavior of weak pointers straightforward compared to previous OCaml version:
- A weak pointer is unset only if the value pointed is marked dead after the mark phase (ie. no
way to ever access it, the memory could be freed).
- Conversely, during the clean phase, a weak pointer to a dead value is considered unset (so
Weak.get return None).
If you know weird behavior in 4.03+beta on weak pointers or ephemeron, I would be very interested to
know them.
Best,
--
François
next prev parent reply other threads:[~2016-03-14 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 15:49 Goswin von Brederlow
2016-03-08 16:00 ` Gabriel Scherer
2016-03-08 19:04 ` Goswin von Brederlow
2016-03-11 15:05 ` François Bobot
2016-03-14 10:32 ` Goswin von Brederlow
2016-03-14 16:44 ` François Bobot [this message]
2016-03-15 9:43 ` Goswin von Brederlow
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=56E6EA6C.8090605@cea.fr \
--to=francois.bobot@cea.fr \
--cc=caml-list@inria.fr \
--cc=goswin-v-b@web.de \
/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