* tests/env/env.sh: Avoid calling "sh" with a modified argv[0],
as e.g. with busybox providing sh, it will fail with "applet not found".
Reported by Bruno Haible.
This was seen on Centos 7 at least with bash 4.2.46.
* tests/timeout/timeout.sh: Ensure the shell doesn't incorrectly
optimize itself away when there are traps in place.
Reported by Bruno Haible.
* tests/ls/line-separator.sh: Skip on systems that treat
U+2028 (LINE SEPARATOR), and U+2029 (PARAGRAPH SEPARATOR)
as printable. Also since we're requiring our printf now,
use that to decouple the test from the particular shell-escape
quoting form used.
Reported by Bruno Haible.
This change is performance neutral as tested with:
$ yes $(yes eeeaae | head -n10K | paste -s -d,) | head -n10K > ll.in
$ hyperfine src/cut{,.orig}' -f10 -w ll.in >/dev/null'
* gl/lib/mbbuf.h (mbbuf_fill): Repeat the mbbuf_topup(), i.e. the read()
if the previous run didn't read enough. Note we add the explicit
common case short-circuit to avoid a 20% regression
for the test case above, with GCC 16.2 with -O3 -flto.
* tests/cut/mb-short-read.sh: A new test file.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-JSCMJCN2.
This change is performance neutral as tested with:
$ yes | head -n10M > sl.in
$ yes $(yes éééááé | head -n9 | paste -s -d,) | head -n1M > mb.in
$ hyperfine src/cut{,.orig}' -c1 sl.in >/dev/null'
$ hyperfine src/cut{,.orig}' -f1 -w mb.in >/dev/null'
* src/cut.c (skip_buffered_line): A new refactored helper.
* src/cut.c (scan_mb_line_end): Use help, and also call mbbuf_avail()
to process remaining bytes before topup.
(cut_characters_mode): Likewise. Note the topup is done implicitly
in the following mbbuf_get_char().
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-VRMLC6DR.
* src/split.c (of_t): Add the done member.
(lines_rr): Set the done member for the file if the filter has an
ignorable error. Don't attempt subsequent writes if the done member for
the file is set.
* tests/split/filter.sh: Add a test case.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-NO8YC6GS.
* src/split.c (lines_chunk_split): Make sure CHUNK_NO does not exceed N.
* tests/split/l-chunk.sh: Add a test case without --elide-empty-files
and with it.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-ZDDBFXXM.
* src/sort.c (sortlines): Don't share compressed temporary files when
the same input is given multiple times.
* tests/sort/sort-compress-hang.sh: Add a test case that would
previously hang.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-MYSN7JAW.
* src/copy-file-data.c (sparse_copy): Return -1 when create_hole fails.
* tests/cp/fail-create-hole.sh: New file.
* tests/local.mk (all_tests): Add the new test case.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-C18OTMQ2.
* tests/chown/cannot-access.sh: New test. Ensure chown and chgrp
report "cannot access" for a missing operand, a trailing slash on a
non-directory and a missing file in a directory, and "cannot
dereference" only for a dangling symlink.
* tests/local.mk (all_tests): Reference the new test.
https://github.com/uutils/coreutils/pull/15868
Link: https://github.com/coreutils/coreutils/pull/449
dash 0.5.13 to 0.5.13.5 at least has a variable expansion bug:
https://bugzilla.redhat.com/2568651
This was seen on Fedora 44 and there is no upstream dash
release with a fix yet.
* init.cfg (bad_unicode): Avoid the dash issue, by comparing
the variable expansion and skipping upon mismatch.
* tests/du/block-size.sh: Add explicit checks for expansion
on values with high bit set.
* tests/paste/multi-byte.sh: Likewise.
* gnulib: Update to get commit 8b4da9a18f (attribute: Provide access to
gcc's access attribute., 2026-11-05).
* src/system.h (ptr_align): Use ATTRIBUTE_ACCESS_NONE.
* src/pr.c: Continue processing if the line is truncated instead of
returning early. Return after handling headers, line numbers, etc., but
before printing the truncated clump.
* tests/pr/inf-loop.sh: New file.
* tests/local.mk (all_tests): Add the new test case.
* NEWS: Mention the bug fix.
Discovered by Anthropic's OSS Scanner, as bug ANT-2026-TMZPQ2AH.