From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1177 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: musl bugs found through gnulib Date: Mon, 18 Jun 2012 12:00:22 -0400 Message-ID: <20120618160022.GD163@brightrain.aerifal.cx> References: <20120609230541.47eac2de@newbook> <4FD55156.7050302@cs.ucla.edu> <20120611182202.1ee4d019@newbook> <12545931.v3ALTEUUx8@linuix> <20120617235426.GX163@brightrain.aerifal.cx> <20120618082100.GT17860@port70.net> <4FDF26D8.6050309@barfooze.de> <20120618145545.GC163@brightrain.aerifal.cx> <20120618152630.GU17860@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1340035477 22993 80.91.229.3 (18 Jun 2012 16:04:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2012 16:04:37 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1178-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 18 18:04:37 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SgeRP-00055Z-3g for gllmg-musl@plane.gmane.org; Mon, 18 Jun 2012 18:04:35 +0200 Original-Received: (qmail 5873 invoked by uid 550); 18 Jun 2012 16:04:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5862 invoked from network); 18 Jun 2012 16:04:34 -0000 Content-Disposition: inline In-Reply-To: <20120618152630.GU17860@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1177 Archived-At: On Mon, Jun 18, 2012 at 05:26:32PM +0200, Szabolcs Nagy wrote: > * Rich Felker [2012-06-18 10:55:45 -0400]: > > > there's only one broken program out there, which is gnu coreutils' "od". > > > if someone wants to use coreutils and cares about this uncommon > > > issue, he/she can simply use a patch for this specific program. > > > > The problem is that gnulib is potentially replacing printf in many > > programs (I haven't checked this; would you care to check?) over this > > stupid issue that only affects one broken program, resulting in > > massive bloat for users, and potentially breaking things. > > > > hm, what's the issue with od? > is it about printing random binary data as long double? Yes. > if od invokes undefined behaviour then it's a coreutils bug Yes. > it sounds bad that based on a broken test gnulib may replace > a correct printf implementation with its own broken one > just to make a broken coreutils tool to work so now we > need a libc workaround for this issue.. Coreutils should at least be changed to call isnanl() in the data before calling printf. Then they can get by with just replacing isnanl (ugly but relatively cheap and non-intrusive) instead of replacing all of printf. Rich