From Jskud at Jskud.com  Sat Apr 30 19:55:45 2005
From: Jskud at Jskud.com (Jskud@Jskud.com)
Date: Sat Apr 30 19:55:52 2005
Subject: (PR#7826) [Rd] segfault during build of 2.1.0 on RH9;
	print.POSIXct
Message-ID: <20050430175545.1EA2BA1CA@slim.kubism.ku.dk>

   Date: Sat, 30 Apr 2005 10:47:06 +0100 (BST)
   From: Prof Brian Ripley <ripley@stats.ox.ac.uk>

Thank you for the rapid and helpful reply.	

   1) Why did you submit this *twice*, as PR#7826 and PR#7827?  Please don't 
   be so careless of the volunteers' time.

I noticed that the email I originally sent to R-bugs@R-project.org was
timing out while connecting to hypatia.ethz.ch. [129.132.145.15].
Checking the R-project web page, I found that the recommended address is
r-bugs@biostat.ku.dk; hence, I resent the email to the recommended
address.  I did not intend to waste the volunteers' time, nor to annoy
any of them, and I'm sorry if that happened.

   2) > print.POSIXct
   function (x, ...)
   {
	print(format(x, usetz = TRUE, ...), ...)
	invisible(x)
   }

   is definitely *not* implicated.  (Use of ... in two places is correct.)

I thought use of ... in two places might be incorrect for two reasons.
(1) It would seem to supply the same arguments to both print and format
-- it is not clear that all trailing arguments to print.POSIXct should
go to both routines. (2)  If it is correct to use ... in two places for
print.POSIXct, then why not for print.POSIXlt?

   3) On FC3:

   > unusual_and_faults
   Error: protect(): protection stack overflow
   > format(unusual_and_faults)
   Error: protect(): protection stack overflow
   > as.POSIXlt(unusual_and_faults)
   Error: protect(): protection stack overflow

   which is what should happen.  It looks like RH9 has an inadequate stack 
   size for the new recursion limits of R 2.1.0.  This is nothing whatsoever 
   to do with print.POSIXct.

You are correct -- to deal with problems in other software that I use, I
had reduced my allowed stack size to 1 MB in my .bashrc, and forgotten
about it.  Building R (actually, running the tests) requires a larger
stack.  So it was a user problem, not a RH9 problem.  

   The problem is in fact in c.POSIXct which is not checking its arguments.

Sincerely,

/Jskud


(PR#7826) [Rd] segfault during build of 2.1.0 on RH9; print.POSIXct
Jskud@Jskud.com