GNU bug report logs - #23825
maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstrict-overflow

Previous Next

Package: coreutils;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Wed, 22 Jun 2016 14:38:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>, 23825 <at> debbugs.gnu.org
Subject: bug#23825: maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstrict-overflow
Date: Thu, 23 Jun 2016 14:26:41 +0100
[Message part 1 (text/plain, inline)]
On 23/06/16 08:13, Paul Eggert wrote:
> Incidentally, 'yes' has a different bug: it mishandles the case where 
> 'write' succeeds but returns a value less than the buffer size. I'll try 
> to look into that too. Simplest would be to use stdio (the comments 
> indicate this has performance issues but I don't know what they are, 
> anyway correctness trumps performance).

Good spot on the yes(1) write(2) bug.
Shouldn't impact too often due to smallish BUFSIZ,
and subsequent writes catching ENOSPC,
but definitely could cause issues.

The attached should fix that up, and keep the same
performance characteristics.

cheers,
Pádraig

[yes-short-write.patch (text/x-patch, attachment)]

This bug report was last modified 6 years and 269 days ago.

Previous Next


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