English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Segfault in Garbage collector code: any ideas?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-06-19 (21:51)
From: Mark Shinwell <mshinwell@j...>
Subject: Re: [Caml-list] Segfault in Garbage collector code: any ideas?
On Thu, Jun 19, 2008 at 04:45:27PM -0500, Raj Bandyopadhyay wrote:
> 1) From past  experience, this  sort  of  thing seems  to  occur when  
> I forget to use a CAMLparam/local/return  macro somewhere. However, I  
> have looked over my C code several times and can't find any such  
> problem. Is there any other scenario where this sort of segfault can  
> occur?

One thing worth checking is that you've used a Store_field statement
rather than attempting to use Field (...) as an lvalue.  The latter is
often unsafe (see Rule 6 of "Low-level interface" in the Interfacing C
chapter of the manual).