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 PAA04440; Thu, 18 Sep 2003 15:44:21 +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 PAA25951 for ; Thu, 18 Sep 2003 15:44:20 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8IDiJj15003; Thu, 18 Sep 2003 15:44:19 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA12993; Thu, 18 Sep 2003 15:44:18 +0200 (MET DST) From: Pierre Weis Message-Id: <200309181344.PAA12993@pauillac.inria.fr> Subject: Re: [Caml-list] Segmentation fault at process initialization In-Reply-To: <3F69B143.3080104@baretta.com> from Alex Baretta at "Sep 18, 103 03:21:07 pm" To: alex@baretta.com (Alex Baretta) Date: Thu, 18 Sep 2003 15:44:18 +0200 (MET DST) Cc: caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; pierre:01 weis:01 pierre:01 weis:01 caml-list:01 debugger:01 foo:01 foo:01 prerr:01 endline:01 initialized:01 initialized:01 compiler:01 anyhow:01 cristal:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Alex, > Richard Jones wrote: > > > > Obviously under no circumstances, but I've had it happen a few times. > > Not really. Ocaml programs are guaranteed to be segmetation fault free > only unless they link to C code or use the Marshal module to input data > structures. Or you use the Obj module, or you do a stack overflow on some architectures, or you access out of a string or array on some others. [...] Anyhow, if it is possible, try to compile your code with the bytecode compiler and use the debugger that easily find this kind of problems. Another simple way to localize the problem is to add a message at the end of each compilation unit; for instance, as last line of the implementation file foo.ml of module Foo, just write: prerr_endline "Module Foo successfully initialized.";; This way, you could normally see which module fails to initialized and then you could find more easily why. Hope this helps, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ ------------------- 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