[Rd] gctorture and proc.time (PR#10600)
Stephen Milborrow
milbo at sonic.net
Tue Jan 22 09:31:28 CET 2008
I'm not sure if this is connected but in R2.6.1 do_proctime is missing some
PROTECTs. The current code is
SEXP ans = allocVector(REALSXP, 5), nm = allocVector(STRSXP, 5);
and should be
SEXP ans, nm;
PROTECT(ans = allocVector(REALSXP, 5));
PROTECT(nm = allocVector(STRSXP, 5));
A good way of finding these missing PROTECTs is to write say 0xEE to memory
as it is freed (i.e. one must modify the source of memory.c). Then with gc
torture enabled it more obvious if someone uses a just freed SEXP. There
is a similar issue in a few other places which I haven't tracked down yet
which I will submit to r-bugs in due course. These were found using the
0xEE trick and running make check-all.
Steve
www.milbo.users.sonic.net
----- Original Message -----
From: "Peter Dalgaard" <p.dalgaard at biostat.ku.dk>
To: <charlie at stat.umn.edu>
Cc: <R-bugs at biostat.ku.dk>; <r-devel at stat.math.ethz.ch>
Sent: Tuesday, January 22, 2008 9:56 AM
Subject: Re: [Rd] gctorture and proc.time (PR#10600)
charlie at stat.umn.edu wrote:
> In R version 2.6.1 (2007-11-26)
> and R version 2.6.1 Patched (2008-01-19 r44061)
> on openSUSE 10.2 (X86-64)
>
>
>> gctorture()
>> proc.time()
>>
> Error: protect(): protection stack overflow
>
> The problem with this is that then
>
> R CMD check --use-gct foo
>
> ALWAYS FAILS with
>
>
>> cat("Time elapsed: ", proc.time() - get("ptime", pos =
>> 'CheckExEnv'),"\n")
>>
> Error in proc.time() - get("ptime", pos = "CheckExEnv") :
> non-numeric argument to binary operator
>
> This does not happen in R version 2.4.1 (2006-12-18)
>
> I was going to have my computing class try out --use-gct.
> I guess not until this is fixed.
>
>
I can reproduce this on SUSE 10.2 64 bit and Fedora 7 64 bit, but not on
SUSE 10.3 32 bit and Fedora 8 32 bit. (The OS versions are likely not
relevant, I bet it is a 64 bit issue somewhere).
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
__________ NOD32 2813 (20080122) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
More information about the R-devel
mailing list