From saptarshi.guha at gmail.com  Thu Sep 24 01:10:08 2009
From: saptarshi.guha at gmail.com (Saptarshi Guha)
Date: Wed, 23 Sep 2009 19:10:08 -0400
Subject: [Rd] Crash due to extreme  example
Message-ID: <79EEC4E0-1D9E-4F9A-931F-61354FA17091@gmail.com>

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



[Rd] Crash due to extreme example
Saptarshi Guha