From dusa.adrian at gmail.com  Sat Jul 28 13:02:54 2012
From: dusa.adrian at gmail.com (=?UTF-8?B?QWRyaWFuIER1xZ9h?=)
Date: Sat, 28 Jul 2012 13:02:54 +0200
Subject: [Rd] C code validation
In-Reply-To: <50137E82.8040706@stats.ox.ac.uk>
References: <CAJ=0CtAQw+J5xMBHvnK4ttyRNfzWM2Ak=Q3u8m9HGZt9G0fnmQ@mail.gmail.com>
	<50137E82.8040706@stats.ox.ac.uk>
Message-ID: <CAJ=0CtCbK3PJ39Fj50iNOE+9s_F+Gatfk9RKB3oTr5=0kbnzJg@mail.gmail.com>

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



[Rd] C code validation
=?UTF-8?B?QWRyaWFuIER1xZ9h?=