Re: [Rd] Need help debugging R.

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Wed 25 Aug 2004 - 00:53:41 EST

Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:

> You need one of
>
> 1) gctorture(TRUE)
>
> 2) Run under valgrind to look for memory overruns.
>
> and patience. If it segfaults under gctorture you will probably see the
> real culprit via gdb.
>
> I would try under R-devel, as quite a few memory problems have been
> plugged there. Or at least under R-patched (ditto, but not quite all
> those in R-devel).

Other tricks: record the gc_count value at the crash and set a break conditional on that value, before stack corruption sets in. Or break at the previous value, and then set the gctorture switch. Once you figure out which memory location has inconsistent data, set a hardware watchpoint on it. Might take quite a bit of stamina, in additeon to the patience...

-- 
   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@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Aug 25 01:01:41 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:09 EST