[Rd] Ways to catch segfaults before they happen

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat 06 Nov 2004 - 00:01:29 EST


Those of you who monitor the daily package checks will know that some packages generate ERROR reports spasmodically. This is normally due to segfaults, and in almost all cases has been traced (eventually) to memory access errors using the tool valgrind (http://valgrind.kde.org). Current examples include RCurl, RandomFields, geoR, kza and pcurve.

This week I have run all the examples in all the CRAN packages under valgrind (which took about 120 hours, not all running to completion), and have sent reports to quite a few package maintainers. A good selection of the reports will be available at

http://www.stats.ox.ac.uk/pub/bdr/Rvg

for the next week or so. Valgrind is not infallible and sometimes gets confused by highly optimized code (and these tests were run with -O2): I reckon this is the case for the loess_raw reports.

`Writing R Extensions' in 2.0.1 will have a section on `writing portable packages' covering this, and R-devel has a R CMD check --use-valgrind option to run all the examples/tests/vignettes under valgrind -- beware that is typically 20x slower.

Another problem area is running packages on 64-bit platforms, and quite a few package maintainers have received reports about that (and many have updated their packages already, thank you). I am aware of problems currently in

    AnalyzeFMRI CoCo PBSmapping assist dblcens gap haplo.stats odesolve     sampfling subselect

some of which result in infinite loops and others in segfaults.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat Nov 06 00:15:18 2004

This archive was generated by hypermail 2.1.8 : Sat 06 Nov 2004 - 01:08:16 EST