[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15147: tr: crash upon failed write(2)
From: |
Paul Eggert |
Subject: |
bug#15147: tr: crash upon failed write(2) |
Date: |
Tue, 20 Aug 2013 15:26:52 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 |
I can reproduce the problem without coreutils
on Ubuntu 13.04 x86-64. Compile the following
program with plain "gcc foo.c" and then run
"./a.out >/dev/full"; it'll dump core the same way.
So it appears that this is a bug in the C library,
not in coreutils.
It's a fairly serious bug, I'd say.
#include <stdio.h>
int
main (void)
{
static char io_buf[BUFSIZ];
if (fwrite (io_buf, 1, sizeof io_buf, stdout) != sizeof io_buf)
{
perror ("write error");
return 1;
}
return 0;
}