From romain.francois at dbmail.com  Tue Sep 22 19:07:37 2009
From: romain.francois at dbmail.com (Romain Francois)
Date: Tue, 22 Sep 2009 19:07:37 +0200
Subject: [Rd] cannot build R-devel (>= r49747)
In-Reply-To: <4AB8F8B5.4000609@stats.uwo.ca>
References: <4AB86E88.5070304@dbmail.com>	<4AB87A07.6040605@biostat.ku.dk>	<4AB87DB6.5070507@dbmail.com>	<4AB88D7A.7040408@dbmail.com>	<4AB897F1.3060905@biostat.ku.dk>	<4AB89935.3040104@dbmail.com>
	<4AB89BDF.2090200@stats.uwo.ca> <4AB89DE4.3000506@dbmail.com>
	<4AB8F8B5.4000609@stats.uwo.ca>
Message-ID: <4AB90459.5020005@dbmail.com>

Thanks. Works for me also now.

On 09/22/2009 06:17 PM, Duncan Murdoch wrote:
>
> I believe this is fixed now (as of r49786). The problem is that the
> parse code does bad things with the protection stack -- rather than
> pairing PROTECT with UNPROTECT, it does bulk unprotects by saving and
> restoring the stack pointer -- and in the new code the
> ParseState.SrcFile ended up getting released more than once.
>
> Duncan Murdoch
>
> On 9/22/2009 5:50 AM, Romain Francois wrote:
>> On 09/22/2009 11:41 AM, Duncan Murdoch wrote:
>>>
>>> On 22/09/2009 5:30 AM, Romain Francois wrote:
>>>> On 09/22/2009 11:25 AM, Peter Dalgaard wrote:
>>>>> Romain Francois wrote:
>>>>>
>>>>>> However, this might be relevant about my setting, I have the
>>>>>> "R_KEEP_PKG_SOURCE" environment variable set to "yes". And if I
>>>>>> set it
>>>>>> to "no" it builds correctly.
>>>>> AHA! Yes, that makes sense
>>>>>
>>>>> R_KEEP_PKG_SOURCE=yes make
>>>>>
>>>>> breaks for me too with the unprotect_ptr message (SUSE 64bit this
>>>>> time).
>>>>>
>>>>
>>>> I can now track this down to these lines in gram.(y|c)
>>>>
>>>> if (!isNull(ParseState.SrcFile))
>>>> UNPROTECT_PTR(ParseState.SrcFile);
>>>>
>>>> The error occurs the first time ParseState.SrcFile is not null.
>>>
>>> Thanks for this info. I can track it down now.
>>>
>>> Duncan Murdoch
>>
>> Good. You'll probably be able to fix it much faster.
>>
>> My only guess is that some extra care is needed when UNPROTECT_PTR'ing
>> environments, because if I comment this, then the same problem occurs
>> in R_FinalizeSrcRefState(SrcRefState *state) at the end of the parse.
>>
>> Romain


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/yw8E : New R package : sos
|- http://tr.im/y8y0 : search the graph gallery from R
`- http://tr.im/y8wY : new R package : ant



[Rd] cannot build R-devel (>= r49747)
Romain Francois