From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0OLfIor031649 for ; Mon, 24 Jan 2011 22:41:18 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugAAPeAPU1KfVK2kGdsb2JhbACWTo4WCBUBAQIJCQwHEQQgoUiJe4IXhGMuiFgBAQMFhUsEjzE X-IronPort-AV: E=Sophos;i="4.60,371,1291590000"; d="asc'?scan'208";a="87834792" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-MD5; 24 Jan 2011 22:41:13 +0100 Received: by wyf19 with SMTP id 19so4589514wyf.27 for ; Mon, 24 Jan 2011 13:41:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type; bh=wkLB4gJBsfLvoS+W/bdSsy3SqzZ+aLCaHPPjzYFiwUY=; b=re50/eZnv/Ioi1q6aAePhA2Lo6RQAX5aD1ODoU8JKgIpO81dvb4gRwEZIw7wunrbCH VyZNG9yZuQLNqKkE4AAAxIwlJrNuvBGNOiFXzAXpkwz3dEaQgI8LBbxnyI+bIxjTwAGh OgN1OOQeXWfBAoXQZVV29GkIZUSvVUfc/Ug7I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=lHBIhj42JhhJ7U1JgTJIOeSQNynq5vi1bA/Me3EC4GVyEdPjBes2kNgMD5weWQn6DU m4Es7hTZ/WC1XwVUJZCprSvWQbXc1WDs/0+J9iCNA+elIBh3XL/Rjt0Xh0gdT0WFb14M JzLpgjGKg97EgwU8kQX35MTk1bBde+8QA4vgM= Received: by 10.227.127.141 with SMTP id g13mr5095356wbs.62.1295905272831; Mon, 24 Jan 2011 13:41:12 -0800 (PST) Received: from macbookpro.local (bin73-1-78-240-16-62.fbx.proxad.net [78.240.16.62]) by mx.google.com with ESMTPS id 11sm9611675wbi.18.2011.01.24.13.41.10 (version=SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 13:41:11 -0800 (PST) Message-ID: <4D3DF1F0.2080008@univ-savoie.fr> Date: Mon, 24 Jan 2011 22:41:04 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: caml-list@inria.fr References: <4D3B05E6.3090103@univ-savoie.fr> <5E60A32A-4DAB-4870-AD8F-20080071B81B@inria.fr> In-Reply-To: <5E60A32A-4DAB-4870-AD8F-20080071B81B@inria.fr> X-Enigmail-Version: 1.1.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFB8AEB349A1FDF64424B79DF" Subject: Re: [Caml-list] Weak array semantics with mutually recursive values. This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFB8AEB349A1FDF64424B79DF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 24/01/11 13:45, Damien Doligez a =E9crit : > On 2011-01-22, at 17:29, Christophe Raffalli wrote: > >> for instance. They will become unreachable by the GC at the same cycle. >> However, >> if they are both added in a weak array, it seems that they may not be >> removed at the same time from the array. >> >> I have some code that seems to show that most of the time they are >> removed at the same times, but very rarely this fails. > As far as I can tell, it should never happen. Do you have a good > repro case? Hello, I will try to investigate further my example to make sure it is not another problem. If I get a simple repro case, I will post it. What I was considering recently (after my second post) is the following scenario: t and u are two inaccessible mutually recursive values, but one is still in the minor heap (t) while the other (u) has been promoted (if a minor cycle just ended between the allocation of both values, this seems possible even if unlikely). In this case, the finalisation of t and its removal from a weak array might occur long before the finalisation of u ? Cheers, Christophe --------------enigFB8AEB349A1FDF64424B79DF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk098fQACgkQi9jr/RgYAS566wCcChRbrPT/lwGS6Xu+2qfQ8DRH CcYAoLEE6o49gMj+uM3RWYQYLbYm5jeI =brrO -----END PGP SIGNATURE----- --------------enigFB8AEB349A1FDF64424B79DF--