mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Lorenzo Beretta <vc.net.loreb@gmail.com>
To: musl@lists.openwall.com
Subject: [musl] Re: request: please detect reads from stdin with unflushed
Date: Mon, 25 Oct 2021 15:17:13 +0200	[thread overview]
Message-ID: <CAAMnvkcTXfB6NW+cQCccLkMpWa4FKz7Lu1FTp7ReMw_x5ws6Og@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

> Suggestion: fix those broken programs!

I know, I know... the problem is that they work with glibc and they fail
silently with musl, and on top of that I've just discovered that at least
netbsd and openbsd do the same as glibc, ie a broken program like
#include <stdio.h>
int main(){
        printf("not flushed: ");
        char line[123];
        return fgets(line,sizeof line,stdin) ? 0 : 123;
}

happens to work!!!

What I'm asking is that musl (while technically correct!) helps
__detecting__ those programs, possibly as an option ("#ifdef
HUMOR_BROKEN_PROGRAMS")

PS
I'm not subscribed to this mailing list, sorry for not mentioning it the
first time

[-- Attachment #2: Type: text/html, Size: 1224 bytes --]

             reply	other threads:[~2021-10-25 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 13:17 Lorenzo Beretta [this message]
2021-10-25 17:25 ` Rich Felker
2021-10-25 18:13   ` Lorenzo Beretta

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=CAAMnvkcTXfB6NW+cQCccLkMpWa4FKz7Lu1FTp7ReMw_x5ws6Og@mail.gmail.com \
    --to=vc.net.loreb@gmail.com \
    --cc=musl@lists.openwall.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).