From guillaume.yziquel at citycable.ch  Wed Nov 18 03:39:35 2009
From: guillaume.yziquel at citycable.ch (Guillaume Yziquel)
Date: Wed, 18 Nov 2009 03:39:35 +0100
Subject: [Rd] R_NilValue and segfault.
In-Reply-To: <4B035C77.9000504@citycable.ch>
References: <4B0351D1.5040105@citycable.ch> <4B035C77.9000504@citycable.ch>
Message-ID: <4B035E67.4060502@citycable.ch>

Guillaume Yziquel a ?crit :
> Guillaume Yziquel a ?crit :
>> Hello.
>>
>> I've been trying to wrap up the R_NilValue into OCaml-R. I 
>> nevertheless get a segfault.
> 
> Is the value of R_NilValue (I mean the address in the R_NilValue pointer 
> located in the uninitialized data section - i.e. the BSS section) set up 
> *after* the init function is called?

I mean: after the Rf_initEmbeddedR is called?

I Objective Caml is really static. Which means that if I declare R.null 
to be R_NilValue, it will take the value of the pointer before 
Rf_initEmbeddedR is executed. And it would be garbage. That would 
perhaps be my issue.

Could someone confirm?

All the best,

-- 
      Guillaume Yziquel
http://yziquel.homelinux.org/



[Rd] R_NilValue and segfault.
Guillaume Yziquel