This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory


------- Additional Comments From pasky at suse dot cz  2009-12-11 13:24 -------
Not really, file descriptor is something different from file stream. Something
can close the file descriptor while keeping the stream alive (e.g. by obtaining
it from stream using fileno() or by mass-closing all file descriptors), then
this error would trigger.

But if you close the stream itself, there's no stream _of_ the underlying file
descriptor. After you fclose(), the FILE* value is totally invalid and you must
not use it anymore.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=11082

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]