Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Segmentation fault at process initialization
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] Segmentation fault at process initialization
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