From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 51E5C7FEEB for ; Sat, 18 Jun 2016 18:55:05 +0200 (CEST) IronPort-PHdr: 9a23:ddNSFx0SbW32qEzNsmDT+DRfVm0co7zxezQtwd8ZsegRKPad9pjvdHbS+e9qxAeQG96LurQV0aGP6/CocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC3oLmjavro82bSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoJvvRNWqTifqk+UacQTHF/azh0t4XXskz/0xER5TMxXnoXlFIcDgTa7Re5W5O0tSDzs+5V1TWdJ8r1C7Y5RWLxwb1sTUrMhSBPCD447Gyf3sh9i4pfuA37+lp5zpKCM9LdD+Z3Yq6IJYBSfmFGRMsEEnUZWo4= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=leo@lpw25.net; spf=None smtp.mailfrom=leo@lpw25.net; spf=None smtp.helo=postmaster@out3-smtp.messagingengine.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of leo@lpw25.net) identity=pra; client-ip=66.111.4.27; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="leo@lpw25.net"; x-sender="leo@lpw25.net"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of leo@lpw25.net) identity=mailfrom; client-ip=66.111.4.27; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="leo@lpw25.net"; x-sender="leo@lpw25.net"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@out3-smtp.messagingengine.com) identity=helo; client-ip=66.111.4.27; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="leo@lpw25.net"; x-sender="postmaster@out3-smtp.messagingengine.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxAQCue2VXhxsEb0JdhRG6YoF6hhcCgR84FAEBAQEBAQEBEQEBAQoLCQkhL0ESAYFdghsBAQMBQDkBBAsLISUPAQQoIYg7CAS0IYkGgkgBCgEBARsIHopWihuYegGOKok1hW2Pdx6CPRILF4E2bYcXgzEBAQE X-IPAS-Result: A0AxAQCue2VXhxsEb0JdhRG6YoF6hhcCgR84FAEBAQEBAQEBEQEBAQoLCQkhL0ESAYFdghsBAQMBQDkBBAsLISUPAQQoIYg7CAS0IYkGgkgBCgEBARsIHopWihuYegGOKok1hW2Pdx6CPRILF4E2bYcXgzEBAQE X-IronPort-AV: E=Sophos;i="5.26,487,1459807200"; d="scan'208";a="222968109" Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2016 18:55:04 +0200 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 0E310205A1; Sat, 18 Jun 2016 12:55:03 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Sat, 18 Jun 2016 12:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=lpw25.net; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=XNV3Y XnQPEyXu+BxYtjtLfLTEjk=; b=jLAGKbw3Lwps3QtiSSHIf4rLSxuPIPdFM1beA UkmtT+669PKk2weTDs5x5+OrZSAyM2SpaKgn6QM9YDNqOz66ExOmuH0bwm1Am2mb G7D0loosxXLx6YKQi6r9SN6BKsP+KNTRMcwvgXOLkFq0DhOFHuEr+HIx2KZFxr4Y 5cWkRI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=XNV3YXnQPEyXu+BxYtjtLfLTEjk=; b=WnX+U mryHnxR78Q7YjeWdkFsusVoNA8ng/BhH+c6OSiMm2MGtF8E0cVq9ibeiaFUqMUpL kCUlx33dO6rZ6gINj6DUo2aprKXS2qFXqvGgxlDx+dR/71n3vkftnmEDMklZSWca IVWkS5kKeoAd2HZolcAM1AMq9uewlw/RG/xCbE= X-Sasl-enc: BiXTvau04cSpsTbnSKB4X6+Hzt9ITTYW3qFd3Hd3STB9 1466268902 Received: from netbook (cpc99054-walt22-2-0-cust965.13-2.cable.virginm.net [86.24.43.198]) by mail.messagingengine.com (Postfix) with ESMTPA id 4150DF29FE; Sat, 18 Jun 2016 12:55:02 -0400 (EDT) From: Leo White To: =?utf-8?B?VMO2csO2aw==?= Edwin Cc: caml-list@inria.fr References: <7182303B-EBFF-4CFC-A7DF-B5C7A059509F@marneu.com> <3673db34-9350-a9b1-fcd5-e7593ba0fd01@etorok.net> X-Face: "XWxb[u_Z\PA_Y?9@|IA!!+jTb(/290-*ea/Un$I0B98.$n%eL.;2w*,z]WR#T:,p[ NBd++M7l]#7zj7!{~iw $W-"/=|dVjhT[D{4~gE}gK<2`.6fs!;uqqud]vs2N/3^m7{aS1V, Date: Sat, 18 Jun 2016 17:54:59 +0100 In-Reply-To: <3673db34-9350-a9b1-fcd5-e7593ba0fd01@etorok.net> (=?utf-8?B?IlTDtnLDtms=?= Edwin"'s message of "Fri, 17 Jun 2016 22:41:25 +0300") Message-ID: <86eg7ucu8s.fsf@lpw25.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Presumed bug in OCaml's garbage collector or in its Weak module... > Shallow copies don't seem very safe in the presence of out-of-OCaml-heap C pointers [*]. > Perhaps Weak.get_copy should raise if it encounters a Custom_tag? Shallow copies aren't even type-safe in the proper sense of the word, since copying a value of abstract type breaks abstraction. This is why Obj.dup is in the Obj module. Really Weak.get_copy shouldn't exist, or should at least be part of Obj not Weak. I suspect Weak.get_copy only really exists for implementing the weak hash tables, and even there using it means that you could give Weak.Make a valid argument whose equal function used `==` and it would give incorrect results. Regards, Leo