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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 8D41C7EC6E for ; Wed, 29 Jan 2014 08:08:38 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ygrek@autistici.org) identity=pra; client-ip=178.255.144.35; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ygrek@autistici.org"; x-sender="ygrek@autistici.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ygrek@autistici.org designates 178.255.144.35 as permitted sender) identity=mailfrom; client-ip=178.255.144.35; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ygrek@autistici.org"; x-sender="ygrek@autistici.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@contumacia.investici.org designates 178.255.144.35 as permitted sender) identity=helo; client-ip=178.255.144.35; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ygrek@autistici.org"; x-sender="postmaster@contumacia.investici.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYBAGio6FKy/5Ajm2dsb2JhbABZg0S9XAt+Fg4BAQEBAQgJCwkUKIIlAQEBAwE6BgEBOAQLCwkYJQ8SNhmHcQMJDAmod4RSAQWTQw2IHBEGjGqCHBYYhAqJS4V/hnaBawGBMoUWhhaIew X-IPAS-Result: AqYBAGio6FKy/5Ajm2dsb2JhbABZg0S9XAt+Fg4BAQEBAQgJCwkUKIIlAQEBAwE6BgEBOAQLCwkYJQ8SNhmHcQMJDAmod4RSAQWTQw2IHBEGjGqCHBYYhAqJS4V/hnaBawGBMoUWhhaIew X-IronPort-AV: E=Sophos;i="4.95,740,1384297200"; d="scan'208";a="46843324" Received: from contumacia.investici.org ([178.255.144.35]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 29 Jan 2014 08:08:35 +0100 Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ygrek@autistici.org) by localhost (Postfix) with ESMTPSA id 5575FE9FAA for ; Wed, 29 Jan 2014 07:08:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1390979312; bh=ERIXB1vpyX36tygwjKe5kfjXq4QdcTJgP8ubUMetIx4=; h=Date:From:To:Subject:In-Reply-To:References; b=G9Wtg4R37teoQL38K2wiZiuRacSaSJfxlqvZz9Ceq/lEqgrUzIHExFTqI/jCTzJY3 8NetLm2p0anVjHXSCHmsZ5KuaGMTmKah7H+j78/oRV1rtBP646ZncJmKeSUOMQE/Oy 45jeaou/aT1FPdBsVny0GtyHmqcZmHb+9TLTR1gs= Date: Wed, 29 Jan 2014 15:08:26 +0800 From: ygrek To: caml-list@inria.fr Message-ID: <20140129150826.7000c270@kiwi.local.tld> In-Reply-To: References: X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.10; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] ocaml 4.01.0 Marshal dumping on Object On Wed, 29 Jan 2014 02:09:52 +0100 Xavier Van de Woestyne wrote: > But I've some problems when I try to serialize an Object : > > *Exception: Invalid_argument "output_value: abstract value (outside heap)* Quoting the manual[1] : > If flags does not contain Marshal.Closures, marshaling fails when it > encounters a functional value inside v: only 'pure' data structures, > containing neither functions nor objects, can safely be transmitted > between different programs. If flags contains Marshal.Closures, > functional values will be marshaled as a position in the code of the > program. In this case, the output of marshaling can only be read back > in processes that run exactly the same program, with exactly the same > compiled code. (This is checked at un-marshaling time, using an MD5 > digest of the code transmitted along with the code position.) I read it as objects are not marshallable at all. [1]: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Marshal.html --