From murdoch at stats.uwo.ca  Thu Sep 24 17:31:42 2009
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Thu, 24 Sep 2009 11:31:42 -0400
Subject: [Rd] Crash due to extreme example
In-Reply-To: <1e7471d50909240800h659e0af1ubbe200128f48323b@mail.gmail.com>
References: <79EEC4E0-1D9E-4F9A-931F-61354FA17091@gmail.com>
	<4ABB47D1.1040103@stats.uwo.ca>
	<1e7471d50909240800h659e0af1ubbe200128f48323b@mail.gmail.com>
Message-ID: <4ABB90DE.5080501@stats.uwo.ca>

On 9/24/2009 11:00 AM, Saptarshi Guha wrote:
> Thanks.
>  What caused problem?

R builds up the element name (x$x$x ...) in a fixed size buffer.  There 
was code to detect when the buffer was full and stop building the name, 
but it was buggy.  I patched the bug.

Duncan Murdoch

> Regards
> Saptarshi
> 
> On Thu, Sep 24, 2009 at 6:20 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>> Now fixed, in R-devel and R-patched.
>>
>> Duncan Murdoch
>>
>> On 23/09/2009 7:10 PM, Saptarshi Guha wrote:
>>>
>>> Hello,
>>> I was trying this bit of code (i know it is an extreme case)
>>>
>>> g=function(r){
>>>   if(r==1)
>>>        return(list(x=1))
>>>    else
>>>        return(list(x=g(r-1)))
>>>    }
>>>
>>> For z=g(500), the code runs but when I print z i.e
>>>  >> z
>>> I get
>>> <environment: R_GlobalEnv>
>>>
>>>  *** caught bus error ***
>>> address 0x1, cause 'non-existent physical address'
>>>
>>> Possible actions:
>>> 1: abort (with core dump, if enabled)
>>> 2: normal R exit
>>> 3: exit R without saving workspace
>>>
>>> Running on Leopard, Macbook (intel, 4gb ram)
>>> R version 2.9.2 (2009-08-24)
>>>
>>>
>>> (No libraries loaded)
>>>
>>> Saptarshi Guha | saptarshi.guha at gmail.com |
>>> http://www.stat.purdue.edu/~sguha
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Crash due to extreme example
Duncan Murdoch