From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA12750; Fri, 17 Aug 2001 18:54:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA12546 for ; Fri, 17 Aug 2001 18:54:29 +0200 (MET DST) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f7HGsSL19851 for ; Fri, 17 Aug 2001 18:54:28 +0200 (MET DST) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id JAA26304 for ; Fri, 17 Aug 2001 09:54:26 -0700 (PDT) Date: Fri, 17 Aug 2001 09:54:26 -0700 (PDT) From: Brian Rogoff To: caml-list@inria.fr Subject: Re: [Caml-list] Segfault in a native code multi-threaded program In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 17 Aug 2001, David Mentre wrote: > My program now produces a segfault even in byte code mode. :( > > Probably a misuse of Marshal. I've typed all of its input/output uses > but I've probably messed things between a marshal and its unmarshal > counter part. We use Marshal a lot too and I definitely rely on the rule of thumb "If OCaml dumps core it is a Marshal or C code issue". Where I get hit is not so much in having marshal/unmarshal get out of sync but in leaving around old versions of marshaled data files and trying to read those. The problem manifests itself quickly, but the core dump is unpleasant :-). > > > > It would be very nice to be able to rely on Marshal as safely as on > ocaml typing. Just to be sure that if I expect an int * string, I will > effectively receive an int * string or raise an exception. It could > probably be done using the same tricks as used in printf formatters. > > A more type safe marshaling framework is way up there on my list of desired enhancements. I think this will be part of the extensional polymorphism enhancements that you can see now in G'Caml. -- Brian ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr