<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/tail.c, branch v8.26</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.26</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2016-11-27T21:10:15Z</updated>
<entry>
<title>tail: fix uninitialized memory read when failing to read file</title>
<updated>2016-11-27T21:10:15Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-27T13:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6f30a99fa537adb029283cf2ef03cb4419350e6c'/>
<id>urn:sha1:6f30a99fa537adb029283cf2ef03cb4419350e6c</id>
<content type='text'>
Reproduced under UBSAN with `tail -f &lt;&amp;-` giving:
  tail.c:2220:18: runtime error: load of value 190,
  which is not a valid value for type ‘_Bool'

* src/tail.c (tail_file): Ensure f-&gt;ignore is initialized
in all cases where we can't tail the specified file.
* tests/tail-2/follow-stdin.sh: Add a test case which
checks stderr has no UBSAN warnings.
Fixes http://bugs.gnu.org/25041
</content>
</entry>
<entry>
<title>tail: fix checking of remoteness when not using inotify</title>
<updated>2016-11-24T00:24:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-23T17:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=68c5eeccd0365a6953d292550ffa5c537fa00f90'/>
<id>urn:sha1:68c5eeccd0365a6953d292550ffa5c537fa00f90</id>
<content type='text'>
In recent commit v8.25-93-g7fc7206 we used the f-&gt;remote flag
which wasn't set in all cases.  This was detected with
ASAN giving this error when reading f-&gt;remote;
  runtime error: load of value 190,
  which is not a valid value for type '_Bool'

* src/tail.c (fremote): Query the system even without inotify.
(recheck): Always set f-&gt;fremote for valid files.
</content>
</entry>
<entry>
<title>tail: only retry file open if --retry specifed</title>
<updated>2016-11-10T12:43:42Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-09T19:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4d45722d1160a04e4d26fd812da4e0140ad3550c'/>
<id>urn:sha1:4d45722d1160a04e4d26fd812da4e0140ad3550c</id>
<content type='text'>
* src/tail.c (tail_file): On failure to open a file,
set ignore=true when --retry is not specified.
* tests/tail-2/assert-2.sh: Adjust to the new behavior.
* tests/tail-2/retry.sh: Add a test case.  Also change
from `tail ... &amp;&amp; fail=1` to the more robust `returns_ 1 ...`
construct which detects segfaults etc.
* NEWS: Document the fix.
</content>
</entry>
<entry>
<title>tail: ensure -f --retry 'missing' handles truncation</title>
<updated>2016-11-09T21:38:33Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-09T17:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=659060233ff2cff324be5cf4cc40b782068d45fd'/>
<id>urn:sha1:659060233ff2cff324be5cf4cc40b782068d45fd</id>
<content type='text'>
* src/tail.c (tail_forever): The BLOCKING optimization is only
enabled for non regular files (which can't be truncated), so ensure
we don't enable that unless we've a valid file descriptor.
* tests/tail-2/retry.sh: Add a test case.
* NEWS: Mention the bug fix.
</content>
</entry>
<entry>
<title>tail: avoid outputting repeated data with remote files</title>
<updated>2016-11-09T19:36:42Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-09T17:23:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7fc7206b03a7f54b23904373ad397f693a5fae2a'/>
<id>urn:sha1:7fc7206b03a7f54b23904373ad397f693a5fae2a</id>
<content type='text'>
* src/tail.c (tail_forever): Only read up to st_size on network
file systems to avoid the issue with a stale attribute cache
returning a smaller st_size than we have already read().
The was seen with glusterfs at least and caused the complete
file to be repeatedly output due to assuming the file was
truncated in this case.
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>tail: terminate when following pipes and untailable non pipes</title>
<updated>2016-11-08T23:19:08Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-11-08T17:34:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2a809125299261db9db9b97e93b5885223c6e9d3'/>
<id>urn:sha1:2a809125299261db9db9b97e93b5885223c6e9d3</id>
<content type='text'>
* src/tail.c (ignore_pipe_or_fifo): Mark the descriptor as -1
for pipes so that any_live_files() detects correctly that
the entry is no longer live.
* tests/tail-2/pipe-f.sh: Add a test case.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/24903 which was detected
using Symbolic Execution techniques developed in
the course of the SYMBIOSYS research project at
COMSYS, RWTH Aachen University.
</content>
</entry>
<entry>
<title>all: use die() rather than error(EXIT_FAILURE)</title>
<updated>2016-10-16T11:23:55Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-10-15T22:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=492dcb2eb191b844a2fd5e51db3eed85289bea1f'/>
<id>urn:sha1:492dcb2eb191b844a2fd5e51db3eed85289bea1f</id>
<content type='text'>
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
</content>
</entry>
<entry>
<title>build: add die.h; avoid new warnings from GCC 7</title>
<updated>2016-10-15T15:41:42Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@fb.com</email>
</author>
<published>2016-10-05T02:20:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dad7ab0b7b322a800e6b1012b777169169068388'/>
<id>urn:sha1:dad7ab0b7b322a800e6b1012b777169169068388</id>
<content type='text'>
* src/die.h (die): New file/function from grep.
Note: we expect this file to migrate to gnulib.
* src/csplit.c: Include die.h.
(check_format_conv_type): Use die in place of error-nonzero;break;
* src/install.c (strip): Likewise.
* src/nl.c (proc_text): Likewise.  This also suppresses a new warning
from GCC 7's -Werror=strict-overflow.
* src/tail.c (parse_options): Likewise.
* src/basename.c (main): Adjust "fall through" comment
so that GCC 7's -Wimplicit-fallthrough honors it.
* src/cp.c (main): Add a "fall through" comment.
* src/ls.c (gobble_file): Likewise.
(get_funky_string): Adjust a "fall through" comment so it is
recognized.
* cfg.mk (exclude_file_name_regexp--sc_system_h_headers): Add die.h
to this list of exempt src/*.h files.
</content>
</entry>
<entry>
<title>tail: -F now always processes initially untailable files</title>
<updated>2016-09-28T22:40:47Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2016-09-21T17:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f04daf570b91286d47a80074cf4a6a63c4309dc0'/>
<id>urn:sha1:f04daf570b91286d47a80074cf4a6a63c4309dc0</id>
<content type='text'>
which was not the case when inotify was not available.

* src/tail.c (any_live_files): Simplify, since the IGNORE
flag is now only set when a file should be ignored indefinitely.
(recheck): Only output the "giving up on name" message
when that's actually the case.  Only set the IGNORE flag
when ignoring a file indefinitely.
(tail_file): Likewise.
* tests/tail-2/retry.sh: Add a test case.  Also run
all existing test cases with and without inotify.
NEWS: Mention the fix.
THANKS.in: Add the reporter.
Fixes http://bugs.gnu.org/24495 which was detected
using Symbolic Execution techniques developed in
the course of the SYMBIOSYS research project at
COMSYS, RWTH Aachen University.
</content>
</entry>
<entry>
<title>all: be less strict about usage if POSIX 2008</title>
<updated>2016-02-23T09:05:10Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2016-02-23T09:03:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a7f5d3d6d671bb4e9117b1f72971a19eed135fed'/>
<id>urn:sha1:a7f5d3d6d671bb4e9117b1f72971a19eed135fed</id>
<content type='text'>
sort, tail, and uniq now support traditional usage like 'sort +2'
and 'tail +10' on systems conforming to POSIX 1003.1-2008 and later.
* NEWS: Document this.
* doc/coreutils.texi (Standards conformance, tail invocation)
(sort invocation, uniq invocation, touch invocation):
Document new behavior, or behavior's dependence on POSIX 1003.1-2001.
* src/sort.c (struct keyfield.traditional_used):
Rename from obsolete_used, since implementations are now allowed
to support it.  All uses changed.
(main): Allow traditional usage if _POSIX2_VERSION is 200809.
* src/tail.c (parse_obsolete_option): Distinguish between
traditional usage (which POSIX 2008 and later allows) and obsolete
(which it still does not).
* src/uniq.c (strict_posix2): New function.
(main): Allow traditional usage if _POSIX2_VERSION is 200809.
* tests/misc/tail.pl: Test for new behavior.
</content>
</entry>
</feed>
