From murdoch.duncan at gmail.com  Tue Sep 22 10:46:31 2015
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Tue, 22 Sep 2015 04:46:31 -0400
Subject: [Rd] segfault with readDCF on R 3.1.2 on AIX 6.1 when using
 install.packages
In-Reply-To: <CA+2DmwhXih3Nv9g7ZA5Kh9WudfAat02TCxbb4mOQbeK8WvVqVg@mail.gmail.com>
References: <CA+2Dmwgowjk9+qKcVQOPXRaGpER5wu+UtqZ=pJrJmaNS1DDpdw@mail.gmail.com>
	<CA+2DmwigXqx_ymW85qzgL7JvyM6tHyzyqSNjWcazow+JROZZ+g@mail.gmail.com>
	<CA+2DmwgZ6XKW9Py7bEx9EC-gQtjmR9yJr-JMHW731gxJKarTfg@mail.gmail.com>
	<560045F3.1060503@gmail.com> <56006DA6.1010002@fredhutch.org>
	<56007B12.5090500@gmail.com>
	<CA+2DmwhXih3Nv9g7ZA5Kh9WudfAat02TCxbb4mOQbeK8WvVqVg@mail.gmail.com>
Message-ID: <56011567.60607@gmail.com>

On 21/09/2015 10:20 PM, Vinh Nguyen wrote:
> On Mon, Sep 21, 2015 at 2:48 PM, Duncan Murdoch
> <murdoch.duncan at gmail.com> wrote:
>> On 21/09/2015 4:50 PM, Herv? Pag?s wrote:
>>> Hi,
>>>
>>> Note that one significant change to read.dcf() that happened since R
>>> 3.0.2 is the addition of support for arbitrary long lines (commit
>>> 63281), which never worked:
>>>
>>>    dcf <- paste(c("aa: ", rep(letters, length.out=10000)), collapse="")
>>>    writeLines(dcf, "test.dcf")
>>>    nchar(read.dcf("test.dcf"))
>>>    #        aa
>>>    # [1,] 8186
>>>
>>
>> I don't see that in R 3.2.2 on OSX or 3.2.2 patched on Windows:
>>
>>>    nchar(read.dcf("test.dcf"))
>>         aa
>> [1,] 10000
> 
> I'm at home now and getting the following from Revolution R Open 3.2.2 on a Mac:

You should post bug reports about that build to Revolution.  We have no
idea what changes it includes, and (being part of Microsoft) they have
tens of thousands more employees to deal with their bugs than we (being
all volunteers) do.

However, Herve's second example does illustrate a bug I can reproduce:
one character out of 10000 was read incorrectly.  Could you please try
his final patch and see if it fixes your AIX problems?

> 
>> dcf <- paste(c("aa: ", rep(letters, length.out=10000)), collapse="")
>> writeLines(dcf, "test.dcf")
>> nchar(read.dcf("test.dcf"))
>        aa
> [1,] 8186
> 
> Here's what I see in the file:
> 
> $ wc -c test.dcf
> 
>    10005 test.dcf
> 
> Same results using Revolution R Open on Windows.  Also same results on
> regular R 3.2.0 on Windows.

Version 3.2.0 is not current.

Duncan Murdoch

> 
> -- Vinh
>



[Rd] segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
Duncan Murdoch