Re: memory.profile() messes up the vector heap on Alpha/Linux?

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: memory.profile() messes up the vector heap on Alpha/Linux?
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Sat 27 Nov 1999 - 09:55:04 EST


Message-ID: <x2r9hc6c6f.fsf@blueberry.kubism.ku.dk>

Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:

> Naoki Takebayashi <ntakebay@bio.indiana.edu> writes:
>
> > Hello,
> > I have been trying to debug a problem with R-0.90.0 (this bug was in
> > 0.65.1, too). The following code results in seg faults. It doesn't
> > seg-fault on Linux/intel.
> >
> > > memory.profile()
> > > gc()
...
> The gdb command would be 'watch *0x20001840ef8' (it's important to use
> the address as a number so that one gets a hardware watchpoint), but

Doh! Never mind gdb, sometimes you just need to look at the code:

    PROTECT(ans = allocVector(INTSXP, 21));
    PROTECT(nms = allocVector(STRSXP, 21));
    for (i = 0; i < 21; i++) {
        STRING(ans)[i] = 0;
        STRING(nms)[i] = R_BlankString;
    }

Try making that INTEGER(ans)[i] = 0 ...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:10 EST