From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010917 Description of problem: The following program: #include <stdio.h> #include <errno.h> int main() { errno = ECONNREFUSED; perror(""); return 0; } should print "Connection refused", but prints "Illegal seek". Version-Release number of selected component (if applicable): glibc-2.2.4-11 How reproducible: Always Steps to Reproduce: 1. Run the program above. Additional info: Strace of the program: ... open("/lib/i686/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\305"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=5771848, ...}) = 0 old_mmap(NULL, 1289832, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40091000 mprotect(0x401c3000, 36456, PROT_NONE) = 0 old_mmap(0x401c3000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x131000) = 0x401c3000 old_mmap(0x401c8000, 15976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401c8000 close(3) = 0 munmap(0x40017000, 79310) = 0 dup(2) = 3 fcntl64(0x3, 0x3, 0x3, 0) = 2 brk(0) = 0x80497c0 brk(0x8049940) = 0x8049940 brk(0x804a000) = 0x804a000 fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 _llseek(3, 0, 0xbfffeb30, SEEK_CUR) = -1 ESPIPE (Illegal seek) write(3, "Illegal seek\n", 13Illegal seek ) = 13 close(3) = 0 munmap(0x40017000, 4096) = 0 _exit(0) = ?
Fixed in glibc-2.2.4-13 and later.