GNU bug report logs - #54124
fmt inserts garbage in certain cases?

Previous Next

Package: coreutils;

Reported by: "JD" <john1doe <at> ya.ru>

Date: Wed, 23 Feb 2022 11:28:01 UTC

Severity: normal

Full log


Message #14 received at 54124 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>, JD <john1doe <at> ya.ru>,
 54124 <at> debbugs.gnu.org
Subject: Re: bug#54124: fmt inserts garbage in certain cases?
Date: Wed, 23 Feb 2022 19:06:29 -0800
On 2/23/22 17:29, Pádraig Brady wrote:
> Given isspace('\n') returns true, then it makes some sense that 
> isspace("Next Line")
> would return true,

POSIX says that the application must insure that argument to isspace is 
either EOF or "a character representable as an unsigned char", and 
arguably since 0x85 not either one of those things the behavior of 
isspace(0x85) is undefined.

However, the C standard does not have this wording, and since POSIX is 
supposed to defer to the C standard here, this appears to be a bug in 
POSIX (as well as a bug in macOS). It's understandable if the Apple C 
library's developers got confused by the POSIX wording.




This bug report was last modified 3 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.