Skip to content
Prev 42156 / 63458 Next

Crashing R with readline()

On 11-12-29 9:49 AM, Henrik Bengtsson wrote:
I can reproduce this, but I can't spot where the problem is.  I/O in 
Rterm is very complicated, because we use a getline library that 
implements line editing, and we run the I/O in a thread so that graphics 
windows can be updated while waiting for input.

Presumably the problem is the long prompt causing a buffer overflow 
somewhere, and a workaround is to use a more reasonable length of 
prompt, but I don't think I'm going to be able to offer a real fix.  I'd 
guess this bug is local to Rterm in Windows, but we don't really have 
good tools there to detect buffer overflows.

Duncan Murdoch