public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory
[not found] <bug-11082-131@http.sourceware.org/bugzilla/>
@ 2014-06-30 20:32 ` fweimer at redhat dot com
0 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 20:32 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=11082
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory
2009-12-11 10:22 [Bug libc/11082] New: " jur dot pauw at gmail dot com
2009-12-11 11:10 ` [Bug libc/11082] " ldv at altlinux dot org
2009-12-11 13:13 ` jur dot pauw at gmail dot com
@ 2009-12-11 13:25 ` pasky at suse dot cz
2 siblings, 0 replies; 4+ messages in thread
From: pasky at suse dot cz @ 2009-12-11 13:25 UTC (permalink / raw)
To: glibc-bugs
------- 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory
2009-12-11 10:22 [Bug libc/11082] New: " jur dot pauw at gmail dot com
2009-12-11 11:10 ` [Bug libc/11082] " ldv at altlinux dot org
@ 2009-12-11 13:13 ` jur dot pauw at gmail dot com
2009-12-11 13:25 ` pasky at suse dot cz
2 siblings, 0 replies; 4+ messages in thread
From: jur dot pauw at gmail dot com @ 2009-12-11 13:13 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jur dot pauw at gmail dot com 2009-12-11 13:12 -------
(In reply to comment #1)
> ftell(3) needs a valid FILE pointer, not one already invalidated by fclose(3)
> call. For details see fclose(3) description that says: "any further access
to
> the stream results in undefined behaviour".
This implies that ftell its behaviour is not Posix compliant, see
http://www.opengroup.org/onlinepubs/009695399/functions/ftell.html
ERRORS
The ftell() [CX] and ftello() functions shall fail if:
[EBADF]
[CX] The file descriptor underlying stream is not an open file descriptor.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory
2009-12-11 10:22 [Bug libc/11082] New: " jur dot pauw at gmail dot com
@ 2009-12-11 11:10 ` ldv at altlinux dot org
2009-12-11 13:13 ` jur dot pauw at gmail dot com
2009-12-11 13:25 ` pasky at suse dot cz
2 siblings, 0 replies; 4+ messages in thread
From: ldv at altlinux dot org @ 2009-12-11 11:10 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From ldv at altlinux dot org 2009-12-11 11:10 -------
ftell(3) needs a valid FILE pointer, not one already invalidated by fclose(3)
call. For details see fclose(3) description that says: "any further access to
the stream results in undefined behaviour".
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-30 20:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-11082-131@http.sourceware.org/bugzilla/>
2014-06-30 20:32 ` [Bug libc/11082] fclose(f); ftell(f); results in accesses on free'd memory fweimer at redhat dot com
2009-12-11 10:22 [Bug libc/11082] New: " jur dot pauw at gmail dot com
2009-12-11 11:10 ` [Bug libc/11082] " ldv at altlinux dot org
2009-12-11 13:13 ` jur dot pauw at gmail dot com
2009-12-11 13:25 ` pasky at suse dot cz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).