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 TAA16837; Tue, 11 Jun 2002 19:11:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA16857 for ; Tue, 11 Jun 2002 19:11:49 +0200 (MET DST) Received: from madiran.inria.fr (madiran.inria.fr [128.93.8.77]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g5BHBmH22079; Tue, 11 Jun 2002 19:11:48 +0200 (MET DST) Received: from localhost (madiran.inria.fr [128.93.8.77]) by madiran.inria.fr (Postfix) with ESMTP id 1CA57A78AA; Tue, 11 Jun 2002 19:11:48 +0200 (CEST) Date: Tue, 11 Jun 2002 19:11:47 +0200 (CEST) Message-Id: <20020611.191147.730554460.Jun.Furuse@inria.fr> To: animesh.pathak@inria.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] STRANGE!!! From: "Jun P.FURUSE" In-Reply-To: <200206111640.g5BGeOL03761@payia.inria.fr> References: <200206111640.g5BGeOL03761@payia.inria.fr> X-URL: http://pauillac.inria.fr/~furuse/ X-Face: %NBEt80q,?D$3WNc|UEDB(`B%4yRMn~m!-wQF`!QA@=cZ~?MZJwomF~)69N/W6e/n1),d X-Mailer: Mew version 2.2 on XEmacs 21.4.6 (Common Lisp) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Animesh Pathak Subject: [Caml-list] STRANGE!!! Date: Tue, 11 Jun 2002 18:40:24 +0200 (MET DST) Message-ID: <200206111640.g5BGeOL03761@payia.inria.fr> > hello people, > I seem to have a very strange problem, > I have a client server code (2 separate programs) which transmit data using > Marshal.to_channel and Marshal.from_channel on sockets. > > The problem is.. although I AM able to run the program successfully in the caml > toplevel by #load ing the appropriate .cma/.cmo files, when I run the programs > independently, the server, after getting the data.. allocates memory in > megabytes until a segmentation fault or a bus fault occurs!! It cannot even send > ints. > > Kindly tell me what can possible be causing the problem. > > thanks for paying attn to my query > Animesh Hello, This is just a short answer, since I am currently behind a poor PPP line. You may know that output/input_values are DANGEROUS. There is no type checking of input values. Once you use output/input_values, you are away from the ML type safety. Careless use of ML value I/O makes your program easily explode: # let oc = open_out_bin "data";; # output_value oc 1;; # close_out oc # let ic = open_in "data" # (input_value ic : float);; Seg. fault Also note that between different programs, functions cannot be exchangable, since they are just expressed as pointers which are only valid inside one program. Carefully check whether your two programs exchange values of the same type... ----------------------------------------------------------------------- Jun P. Furuse Jun.Furuse@inria.fr ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners