[Rd] Segmentation fault in recursion, 0.90.1 (PR#409)

Prof Brian Ripley Prof Brian Ripley <ripley@stats.ox.ac.uk>
Tue, 1 Feb 2000 12:45:51 +0000 (GMT)


> From: J.C.Rougier@durham.ac.uk
> Date: Tue, 1 Feb 2000 13:12:57 +0100 (MET)
> 
> The following gives an immediate segmentation fault, v 0.90.1
> 
> "fred" <- function(x) { print(x); Recall(x-1)}
> fred(0)	# segmentation fault at recursion 831
> 
> Obviously this recursion is non-terminating, but shouldn't it be caught
> and reported at some limit?  In 0.64.1 we had
> 
> Error: protect(): stack overflow
> 
> at recursion 831.  Cheers, Jonathan.

Your wish is our command: the development version already gives:

[1] -163
Error in print(x) : evaluation is nested too deeply: infinite recursion?

The limit is set by options(expressions=), which at last actually does
something.


-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._