>>>>> Radford Neal <radf...@cs.toronto.edu> >>>>> on Sat, 13 Jun 2015 17:24:04 -0400 writes:
> The current R release candidate has a lack of protect bug > (of very long standing) [ but not really reported, right ? ] > with respect to the > R_print.na_string and R_print.na_string_noquote fields of > the static R_print structure declared in Print.h. This > shows up very occassionally as incorrect output from the > following lines in reg-tests-2.R: > x <- c("a", NA, "b") > factor(x) > factor(x, exclude="") > The solution (kludgy, but the whole concept is kludgy) is > to forward R_print.na_string and R_print.na_string_noquote > with the other "roots" in RunGenCollect (after the comment > /* forward all roots */). > Radford Neal "Interesting" ... .. more serioulsy: Thank you, Radford! As this about garbage collection, I found I can pretty well reproduce the problem via something like x <- c("a", NA, "b") fx <- factor(x, exclude="") gctorture2(2, 5) r <- replicate(30, capture.output(print(fx))) stopifnot(r[,1] == r) # ^^^ fails because of bug but the R 3.2.1 release candidate probably really cannot be touched now, with something non-trivial like this. We'd be *very* happy to get such problems during alpha or beta testing phase (or even before). Martin Maechler ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel