From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Mon Apr 27 21:25:06 2009
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Mon, 27 Apr 2009 21:25:06 +0200
Subject: [Rd] incorrect output and segfaults from sprintf with
	%*d	(PR#13667)
In-Reply-To: <971536df0904270805s22bb72a9xce5f17ec8f13f20e@mail.gmail.com>
References: <20090424104524.DFA4F283432B@mail.pubhealth.ku.dk>
	<971536df0904270805s22bb72a9xce5f17ec8f13f20e@mail.gmail.com>
Message-ID: <49F60692.1080400@idi.ntnu.no>

Gabor Grothendieck wrote:
> On Fri, Apr 24, 2009 at 6:45 AM,  <maechler at stat.math.ethz.ch> wrote:
>   
>> Yes, the documentation will also have to be amended, but apart
>> from that, would people see a big problem with the "8192" limit
>> which now is suddenly of greater importance
>> {{as I said all along;  hence my question to Wacek (and the
>>  R-develers)  if anybody found that limit too low}}
>>     
>
> I haven't been following all this but in working with strings for
> the gsubfn package my own usage of the package was primarily
> for small strings but then I discovered that others wanted to use
> it for much larger strings of 25,000 characters, say, and it was
> necessary to raise the limits (and there are also performance
> implications which could be addressed too). I don't know what
> the situation is particularly here but cases where
> very large strings can be used include linguistic analysis and
> computer generated R code.
>   

in principle, instead of the quite arbitrary and not justified constant
size limit 8192 [1], one could use dynamic arrays.  this would allow
strings of arbitrary length without adding much performance penalty for
strings shorter than 8193 bytes.

[1] src/include/Defn.h:60



[Rd] incorrect output and segfaults from sprintf with %*d (PR#13667)
Wacek Kusnierczyk