public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug nptl/14697] Behavior of exit is nonconformant with respect to threads and stdio Date: Mon, 06 Oct 2014 17:51:00 -0000 [thread overview] Message-ID: <bug-14697-131-MDK60ZQZm0@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-14697-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=14697 --- Comment #1 from Rich Felker <bugdal at aerifal dot cx> --- It seems that this bug can also result in more serious corruption such as duplicate output, even without any explicit file locking. See the example in this question on Stack Overflow, which is a perfectly valid program producing incorrect output: http://stackoverflow.com/questions/26211423/unexpected-output-in-a-multithreaded-program Of course the program has unpredictable output, but there is a finite set of outputs it can produce on a correct implementation: different interleavings of the lines, and different cutoffs for the number of lines produced by sample_thread. A real-world example where this could easily happen is writing a log file using stdio. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2014-10-06 17:51 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-10 18:04 [Bug nptl/14697] New: " bugdal at aerifal dot cx 2014-06-25 6:45 ` [Bug nptl/14697] " fweimer at redhat dot com 2014-10-06 17:51 ` bugdal at aerifal dot cx [this message] 2023-06-06 9:43 ` fweimer at redhat dot com 2023-07-03 8:03 ` cvs-commit at gcc dot gnu.org 2023-07-03 9:07 ` fweimer at redhat dot com 2024-02-06 14:38 ` gabravier at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-14697-131-MDK60ZQZm0@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).