[Rd] A potential POSIXlt->Date bug introduced in r-devel

Berwin A Turlach berw|n@tur|@ch @end|ng |rom gm@||@com
Thu Oct 6 10:41:46 CEST 2022


G'day all,

On Thu, 6 Oct 2022 10:15:29 +0200
Martin Maechler <maechler using stat.math.ethz.ch> wrote:

> >>>>> Davis Vaughan 
> >>>>>     on Wed, 5 Oct 2022 17:04:11 -0400 writes:  

>     > # Weird, where is the `NA`?
>     > as.Date(x)  
>     > #> [1] "2013-01-31" "1970-01-01" "2013-03-31"  
>     > ```  
> 
> I agree that the above is wrong, i.e., a bug in current  R-devel.

I have no intention of hijacking this thread, but I wonder whether this
is a good opportunity to mention that the 32 bit build of R-devel falls
over on my machine since 25 September.  It fails one of the regression
tests in reg-tests-1d.R.  The final lines of reg-tests-1d.Rout.fail
are:

> tools::Rd2txt(rd, out <- textConnection(NULL, "w"), fragment = TRUE)
> stopifnot(any(as.character(rd) != "\n"),
+           identical(textConnectionValue(out)[2L], "LaTeX"));
close(out)
> ## empty output in R <= 4.2.x
> 
> 
> ## as.POSIXlt(<very large Date>)  gave integer overflow
> stopifnot(as.POSIXlt(.Date(2^31 + 10))$year == 5879680L)
Error: as.POSIXlt(.Date(2^31 + 10))$year == 5879680L is not TRUE
Execution halted


I should have reported this earlier, but somehow did not find the time
to do so.  So I thought I mention it here. :)

Cheers,

	Berwin



More information about the R-devel mailing list