From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id A11C8BB9C for ; Thu, 15 Sep 2005 16:41:36 +0200 (CEST) Received: from smtp2.wanadoo.fr (smtp2.wanadoo.fr [193.252.22.29]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8FEfaLW027975 for ; Thu, 15 Sep 2005 16:41:36 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0209.wanadoo.fr (SMTP Server) with ESMTP id 3EA401C001D0 for ; Thu, 15 Sep 2005 16:41:36 +0200 (CEST) Received: from nono (ARouen-106-1-13-133.w80-11.abo.wanadoo.fr [80.11.246.133]) by mwinf0209.wanadoo.fr (SMTP Server) with SMTP id DE00C1C00212 for ; Thu, 15 Sep 2005 16:41:35 +0200 (CEST) X-ME-UUID: 20050915144135909.DE00C1C00212@mwinf0209.wanadoo.fr Message-ID: <005201c5ba04$1797ff80$0100a8c0@mshome.net> From: =?iso-8859-1?Q?Fr=E9d=E9ric_Gava?= To: Subject: Marshal.to_string and mutable values Date: Thu, 15 Sep 2005 16:45:18 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Miltered: at nez-perce with ID 43298820.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gava:01 gava:01 mutable:01 minor:01 heap:01 minor:01 heap:01 ocaml:01 chailloux:01 ocaml:01 bug:01 12.:98 ...:98 ...:98 exception:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hi all, A personnal parallel application crash (but works before) and I am very surprised to find that the pb is in Marshal.to_string. Take for example: let a = ref 0;; (* no pb *) Marshal.to_string a [Marshal.Closures];; -: string = "..." (* minor pb *) Marshal.to_string (fun _ -> a) [Marshal.Closures];; Exception: Invalid_argument "output_value: abstract value (outside heap)" ???? I do not use an abstract value here. But ok, there is peraps side effects after the serialization of the function. (* less minor pb *) let f () = let b = ref 0 in b:=!b+1; 1 ;; Marshal.to_string f [Marshal.Closures];; Exception: Invalid_argument "output_value: abstract value (outside heap)" ???? I can save this function (with its closure). The reference is completely local. For my purpose, a processor could not send to another processor a function wich used some imperative features (for best complexity). That is so bad... Those examples comes from "Development of applications with OCaml" by Chailloux and al. And they suppose to works... and in latest versions of ocaml, they worked. Anybody have an idea ? I suppose it is not a bug but I do not know why it is a pb. Frédéric Gava