If you create a small file, and make sure there is not a newline at the
very
end of the file(I had to use a hex editor), and run this small program
on it,
parrot will just stall and consume cpu and about 20 megs of ram for the
first
while(but does increase). The behavior is the same on freebsd-x86 and
darwin-ppc.
.sub main :main
$P0 = open 'temp.file', '<'
loop:
$S1 = readline $P0
$I0 = length $S1
if $I0 != 0 goto loop
.end
The problem lies in io_buf.c, at line 562. My best guess is that it
doesn't
check that it hasn't gone past the end of the buffer. In some
instances,
parrot segfaults at this location, but it may take a while.
> The problem lies in io_buf.c, at line 562. My best guess is that it
> doesn't check that it hasn't gone past the end of the buffer. In some
> instances, parrot segfaults at this location, but it may take a while.
Tested in 17079, fixed in r17103.
-- c