bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fopen of directory bug in glibc 2.3.2


From: devik
Subject: fopen of directory bug in glibc 2.3.2
Date: Mon, 15 Sep 2003 17:50:04 +0200 (CEST)

Hello,

I can't access GNATS so I send this here as I maybe of
your interest. When developing app with glibc 2.3.2
(compiled myself) on Linux (kernel 2.4.21) I found
that fopen("/","r") works and fgets from it returns
NULL. Strace:
open("/", O_RDONLY)                     = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40016000
read(3, 0x40016000, 4096)               = -1 EISDIR (Is a directory)
close(3)                                = 0

It is bug IMHO but I'm not sure. I also didn't tested on other
systems.

besr regards,
-------------------------------
    Martin Devera aka devik
Linux kernel QoS/HTB maintainer
  http://luxik.cdi.cz/~devik/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]