bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23073: wc reports wrong byte counts when using '--from-files0=-'


From: Bernhard Voelker
Subject: bug#23073: wc reports wrong byte counts when using '--from-files0=-'
Date: Tue, 20 Dec 2016 02:50:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 12/19/2016 08:00 PM, Pádraig Brady wrote:
> +  [bug introduced in coreutils-7.1]

FWIW I think that the bug was not introduced in v7.0-96-gc2e56e0:
I had a working 8.23 on a system here, so I took the time to search deeper.
I found the reason to be the wrong value of the 'hi_pos' parameter passed
to lseek():

  open("wc.big", O_RDONLY)                = 3
  fstat(3, {st_mode=S_IFREG|0644, st_size=1073741824, ...}) = 0
  lseek(3, 1073741824, SEEK_CUR)          = 1073741824
  read(3, "", 16384)                      = 0
  fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 8), ...}) = 0
  write(1, "1073741824 wc.big\n", 181073741824 wc.big)     = 18
  close(3)                                = 0
  open("wc.small", O_RDONLY)              = 3
  lseek(3, 1073741824, SEEK_CUR)          = 1073741824
  read(3, "", 16384)                      = 0
  write(1, "1073741824 wc.small\n", 201073741824 wc.small

This took me directly to v8.23-47-g2662702 (which a quick test
against v8.23-47-g2662702^ confirmed).

Therefore, I think it's worth to do the following amendment:

-  [bug introduced in coreutils-7.1]
+  [bug introduced in coreutils-8.24]

Thanks & have a nice day,
Berny





reply via email to

[Prev in Thread] Current Thread [Next in Thread]