Re: [Rd] Pointer ownership with GECreateDevDesc/GEDestroyDevDesc

2014-09-23 Thread Paul Murrell
This seems like the best solution (free and NULL the dev pointer in dev_Close(), BEFORE GEdestroyDevDesc() has a go). I think this should be safe because dev_Close() and GEdestroyDevDesc() are only called in one place (so your free() should always happen before GEdestroyDevDesc() and your fr

Re: [Rd] Patch for R to fix some buffer overruns and add a missing PROTECT().

2014-09-23 Thread Karl Millar
Bug submitted. Thanks. On Tue, Sep 23, 2014 at 12:42 PM, Duncan Murdoch wrote: > On 23/09/2014 3:20 PM, Karl Millar wrote: >> >> This patch is against current svn and contains three classes of fix: >> - Ensure the result is properly terminated after calls to strncpy() >> - Replace calls

Re: [Rd] Patch for R to fix some buffer overruns and add a missing PROTECT().

2014-09-23 Thread Duncan Murdoch
On 23/09/2014 3:20 PM, Karl Millar wrote: This patch is against current svn and contains three classes of fix: - Ensure the result is properly terminated after calls to strncpy() - Replace calls of sprintf() with snprintf() - Added a PROTECT() call in do_while which could cause memory

[Rd] Patch for R to fix some buffer overruns and add a missing PROTECT().

2014-09-23 Thread Karl Millar
This patch is against current svn and contains three classes of fix: - Ensure the result is properly terminated after calls to strncpy() - Replace calls of sprintf() with snprintf() - Added a PROTECT() call in do_while which could cause memory errors if evaluating the condition results in

Re: [Rd] Bug in new behaviour for all.equal and environments?

2014-09-23 Thread Martin Maechler
> Duncan Murdoch > on Sun, 21 Sep 2014 15:57:00 -0400 writes: > On 21/09/2014, 1:38 PM, Rui Barradas wrote: >> Hello, >> >> In R 3.1.1 on Windows 7 it's ok. >> >> > all.equal(baseenv(), baseenv()) [1] TRUE > >> sessionInfo() R version 3.1.1 (2014-07-10) P

Re: [Rd] Replace isnan and lgamma in Fortran subroutine in R package

2014-09-23 Thread Wang, Zhu
That patch works flawlessly. Thanks Martyn. Zhu -Original Message- From: Martyn Plummer [mailto:plumm...@iarc.fr] Sent: Tuesday, September 23, 2014 8:39 AM To: Wang, Zhu Cc: r-devel@r-project.org Subject: Re: [Rd] Replace isnan and lgamma in Fortran subroutine in R package Try this pat

Re: [Rd] Replace isnan and lgamma in Fortran subroutine in R package

2014-09-23 Thread Martyn Plummer
Try this patch. Martyn On Mon, 2014-09-22 at 22:33 +, Wang, Zhu wrote: > Hello, > > I submitted a package which used Fortran functions isnan and lgamma. However, > I was told that: > > isnan and lgamma are not Fortran 95 functions. > > I was asked to write 'cross-platform portable code' an

Re: [Rd] Replace isnan and lgamma in Fortran subroutine in R package

2014-09-23 Thread Martyn Plummer
On Tue, 2014-09-23 at 07:43 +0200, Berend Hasselman wrote: > On 23-09-2014, at 00:33, Wang, Zhu wrote: > > > Hello, > > > > I submitted a package which used Fortran functions isnan and lgamma. > > However, I was told that: > > > > isnan and lgamma are not Fortran 95 functions. > > > > I was a