public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/15436] New: Don't close or flush stdio streams on abort
@ 2013-05-07 10:51 schwab@linux-m68k.org
2014-06-13 18:08 ` [Bug stdio/15436] " fweimer at redhat dot com
2015-10-09 18:04 ` zackw at panix dot com
0 siblings, 2 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2013-05-07 10:51 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=15436
Bug #: 15436
Summary: Don't close or flush stdio streams on abort
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: stdio
AssignedTo: unassigned@sourceware.org
ReportedBy: schwab@linux-m68k.org
Classification: Unclassified
POSIX doesn't require abort to close or flush any stdio streams, and doing so
will eventually run into locking problems, since fclose and fflush are not
async-signal-safe, while abort is required to be so.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug stdio/15436] Don't close or flush stdio streams on abort
2013-05-07 10:51 [Bug stdio/15436] New: Don't close or flush stdio streams on abort schwab@linux-m68k.org
@ 2014-06-13 18:08 ` fweimer at redhat dot com
2015-10-09 18:04 ` zackw at panix dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 18:08 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15436
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] 3+ messages in thread
* [Bug stdio/15436] Don't close or flush stdio streams on abort
2013-05-07 10:51 [Bug stdio/15436] New: Don't close or flush stdio streams on abort schwab@linux-m68k.org
2014-06-13 18:08 ` [Bug stdio/15436] " fweimer at redhat dot com
@ 2015-10-09 18:04 ` zackw at panix dot com
1 sibling, 0 replies; 3+ messages in thread
From: zackw at panix dot com @ 2015-10-09 18:04 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=15436
Zack Weinberg <zackw at panix dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zackw at panix dot com
--- Comment #1 from Zack Weinberg <zackw at panix dot com> ---
Since glibc has flushed all open files on abort() for a very long time, we
probably ought to try to preserve a best-effort flush.
It appears that "stage 1" of abort() calls _IO_flush_all_lockp(0), which
attempts to flush all open files *without* doing any locking. (This strikes me
as unsafe in a different manner, but at least it probably can't deadlock.)
However, "stage 4" calls __fcloseall(), which does do locking. Maybe that
should be swapped out for another call to _IO_flush_all_lockp(0)? Actually
*closing* the files seems unnecessary since the only things after stage 4 are
an escalating chain of attempts to terminate the process.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-09 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 10:51 [Bug stdio/15436] New: Don't close or flush stdio streams on abort schwab@linux-m68k.org
2014-06-13 18:08 ` [Bug stdio/15436] " fweimer at redhat dot com
2015-10-09 18:04 ` zackw at panix dot com
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).