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] Segfault in a native code multi-threaded program
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-08-17 (08:16)
From: David Mentre <David.Mentre@i...>
Subject: Re: [Caml-list] Segfault in a native code multi-threaded program
Vitaly Lugovsky <> writes:

>  You can try gdb -c core <progname> after segfault even in multithreaded
> environment.

Oh yes, I've forgotten about that. Thanks.

> And, sure, you can use assertions and debugging output (do not forget to
> flush it) to find out where the shit happens.

True. However I wondered if they were more elaborated debugging
techniques before relying on printf.

My program now produces a segfault even in byte code mode. :( 

Probably a misuse of Marshal. I've typed all of its input/output uses
but I've probably messed things between a marshal and its unmarshal
counter part. 

<hint for next ocaml ;)>

  It would be very nice to be able to rely on Marshal as safely as on
  ocaml typing. Just to be sure that if I expect an int * string, I will
  effectively receive an int * string or raise an exception. It could
  probably be done using the same tricks as used in printf formatters.

</hint for next ocaml ;)>

Best regards,
 Opinions expressed here are only mine.
Bug reports:  FAQ:
To unsubscribe, mail  Archives: