From guillaume.yziquel at citycable.ch  Wed Nov 18 05:45:20 2009
From: guillaume.yziquel at citycable.ch (Guillaume Yziquel)
Date: Wed, 18 Nov 2009 05:45:20 +0100
Subject: [Rd] R_NilValue and segfault.
In-Reply-To: <4B0365DE.7060907@stats.uwo.ca>
References: <4B0351D1.5040105@citycable.ch> <4B035C77.9000504@citycable.ch>
	<4B0365DE.7060907@stats.uwo.ca>
Message-ID: <4B037BE0.2070803@citycable.ch>

Duncan Murdoch a ?crit :
> On 17/11/2009 9:31 PM, Guillaume Yziquel wrote:
>> 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?
> 
> It is initialized in InitMemory, called from setup_Rmainloop, called 
> from various places, including Rf_initEmbeddedR, which you should be 
> calling.
> 
> Duncan Murdoch

Unfortunately, it's up to the user of my binding to choose in which 
order he will access Rf_initEmbeddedR or the NULL sexp. Not to me.

Thanks for the confirmation. I found a workaround.

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



[Rd] R_NilValue and segfault.
Guillaume Yziquel