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 PAA05594; Thu, 18 Sep 2003 15:21:59 +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 PAA09946 for ; Thu, 18 Sep 2003 15:21:58 +0200 (MET DST) Received: from flyingtuxman.baretta.com ([213.255.109.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8IDLv512826 for ; Thu, 18 Sep 2003 15:21:57 +0200 (MET DST) Received: from baretta.com (flyingtuxman.baretta.com [127.0.0.1]) by flyingtuxman.baretta.com (8.12.8/8.12.8) with ESMTP id h8IDL7BX021789 for ; Thu, 18 Sep 2003 15:21:28 +0200 Message-ID: <3F69B143.3080104@baretta.com> Date: Thu, 18 Sep 2003 15:21:07 +0200 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030617 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ocaml Subject: Re: [Caml-list] Segmentation fault at process initialization References: <3F69A471.9020807@baretta.com> <20030918125254.GA22780@redhat.com> In-Reply-To: <20030918125254.GA22780@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 postgres:01 stub:01 libpq:01 libpq:01 marshalling:01 gdb:01 gcc:01 ocamlopt:01 ocamlc:01 crashes:01 crashes:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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. I am actually linking my code with the postgres stub library for the libpq, the PostgreSQL client library. But this definitely not the problem. I've been using the same version of libmlpostgres and libpq for months now with no problems. And I also do some marshalling to and from files, but I know this segmentation fault occurs before any files are read in for unmarshalling. > If it's a native code version, try running it under gdb and look at > the stack trace. You can usually work out from the name which module > was being compiled. It'll be something like Module__entry for the > toplevel code, or Module__function_123 for 'function' in the module. > > (You might need to supply the -g option to gcc, ie. ocamlopt -ccopt -g) > > Rich. Let me point out that it is not ocamlc which crashes, but it is my bytecode executable which crashes immediately, before any of my code is executed--otherwise I'd get some diagnostic output, which I do not get. Alex ------------------- 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