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] Debugging mixed ocaml/C code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-12 (10:09)
From: Olivier Andrieu <andrieu@i...>
Subject: Re: [Caml-list] Debugging mixed ocaml/C code
 Yaron M. Minsky [Wednesday 11 September 2002] :
 >   Instead, it segfaults in a predictable place in the ocaml code 
 > instead.  (Surprisingly, it segfaults in the same place if I compile to 
 > native code or bytecode.)

Why is it surprising ? It probably means your C stub returns a
non-block value and caml thinks it's a block value (and when it tries
to access the block, it gets a segfault). Or it could be a block that
was allocated with a wrong size, etc.

You could use a generic function (using Obj) to print the actual
structure of the returned value (block/long, nb of fields, tag, etc).

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