From p.dalgaard at biostat.ku.dk  Wed Oct  8 21:07:25 2003
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard BSA)
Date: Wed Oct  8 22:07:28 2003
Subject: [Rd] Memmory Bugs (PR#4474)
In-Reply-To: <200310081831.h98IVf0P021130@pubhealth.ku.dk>
References: <200310081831.h98IVf0P021130@pubhealth.ku.dk>
Message-ID: <x2llrvjxt6.fsf@biostat.ku.dk>

eriehl@email.unc.edu writes:

>   This message is in MIME format.  The first part should be readable text,
>   while the remaining parts are likely unreadable without MIME-aware tools.
>   Send mail to mime@docserver.cac.washington.edu for more info.
> 
> --43518230-584990211-1065637857=:31587
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> 
> I found (or rather the compiler I was using found) a few bugs in the 
> R-1.7.1 sources.  I'm  not sure if they're fixed in the 1.8.0 sources
> or not.
> 
> I've attached a diff file, where R-1.7.1a is the patches version.
> 
> Eric Riehl
> 
> --43518230-584990211-1065637857=:31587
> Content-Type: TEXT/PLAIN; charset=US-ASCII; name=patch
> Content-Transfer-Encoding: BASE64
> Content-ID: <Pine.LNX.4.44.0310081430570.31587@testbox>
> Content-Description: patches
> Content-Disposition: attachment; filename=patch
> 
> U2VuZGVyOiBMU0YgU3lzdGVtIDxsc2ZhZG1pbkBiYW9iYWItbjMwLmlzaXMu
> dW5jLmVkdT4NClN1YmplY3Q6IEpvYiAxODMyNzogPGRpZmYgLXIgUi0xLjcu
> MS8gUi0xLjcuMWEvPiBFeGl0ZWQNCg0KSm9iIDxkaWZmIC1yIFItMS43LjEv

Please don't use attached files in r-bugs; they become quite a pain to
decipher. Most of the things you report have already been fixed in
1.8.0, except 

diff -r R-1.7.1/src/main/errors.c R-1.7.1a/src/main/errors.c
598c598
<     const R_WARNING code;
---
>     const R_ERROR code;


(This is now in line 750 -- a context diff would have been welcome).

The problem there is that we have

    749 static struct {
    750     const R_WARNING code;
    751     const char* const format;
    752 }
    753 const ErrorDB[] = {
    754     { ERROR_NUMARGS,            "invalid number of arguments"
        },
    755     { ERROR_ARGTYPE,            "invalid argument type"
        },

and the ERROR_* values are not in the R_WARNING enum type. Formally,
that is a bug, but I suspect that we generate the correct code
anyway....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] Memmory Bugs (PR#4474)
Peter Dalgaard BSA