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: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Segmentation fault at process initialization
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