From hpages at fhcrc.org  Sat Jul 13 03:38:39 2013
From: hpages at fhcrc.org (=?ISO-8859-1?Q?Herv=E9_Pag=E8s?=)
Date: Fri, 12 Jul 2013 18:38:39 -0700
Subject: [Rd] missing PROTECT() in src/main/arithmetic.c
Message-ID: <51E0AF9F.5000001@fhcrc.org>

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.

-- 
Herv? Pag?s

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



[Rd] missing PROTECT() in src/main/arithmetic.c
=?ISO-8859-1?Q?Herv=E9_Pag=E8s?=