From luke-tierney at uiowa.edu  Sat Jul 13 17:08:15 2013
From: luke-tierney at uiowa.edu (luke-tierney at uiowa.edu)
Date: Sat, 13 Jul 2013 10:08:15 -0500
Subject: [Rd] missing PROTECT() in src/main/arithmetic.c
In-Reply-To: <51E0AF9F.5000001@fhcrc.org>
References: <51E0AF9F.5000001@fhcrc.org>
Message-ID: <alpine.DEB.2.02.1307131007420.2139@luke-Latitude>

Thanks -- fixed in 63290 (trunk) and 63291 (patched).

luke

On Fri, 12 Jul 2013, Herv? Pag?s wrote:

> at lines 651 & 653 (integer_binary function):
>
>    if (code == DIVOP || code == POWOP)
>        ans = allocVector(REALSXP, n);
>    else
>        ans = allocVector(INTSXP, n);
>
> There are calls to warningcall() later in the function, which can
> trigger garbbage collection.
>
> Looks like the typical scenario where it seemed pretty safe to not
> PROTECT in the original version of the function but became very
> unsafe 3 years later when the calls to warningcall() were added to
> the function.
>
> Cheers,
> H.
>
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   luke-tierney at uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu


[Rd] missing PROTECT() in src/main/arithmetic.c
luke-tierney at uiowa.edu