[Rd] C code validation

Adrian Duşa dusa.adrian at gmail.com
Sat Jul 28 13:02:54 CEST 2012


Dear Prof. Ripley,

On Sat, Jul 28, 2012 at 7:54 AM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> [...]
> See the advice in 'Writing R Extensions'.  In particular, the most common
> cause is the use of initialized values, so run under valgrind.
>
> Also check that your C code does not change any of its arguments: if it does
> you may end up with self-modifying R code.  (That's probably rare, but I
> spent a couple of hours on such an example last night.)

Thanks very much for this, valgrind proved to be a real asset. Thanks
to Martin Morgan as well for pointing the same thing, the issue is now
solved (the code tried to read outside the bounds of the allocated
memory).

Best wishes,
Adrian


-- 
Adrian Dusa
Romanian Social Data Archive
1, Schitu Magureanu Bd.
050025 Bucharest sector 5
Romania
Tel.:+40 21 3126618 \
       +40 21 3120210 / int.101
Fax: +40 21 3158391



More information about the R-devel mailing list