Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 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,,

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: