<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-02-15T08:58:45Z</updated>
<entry>
<title>cp: Expect EINTR while copying</title>
<updated>2026-02-15T08:58:45Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-02-11T16:24:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f1a86b35dedba1b7dfa0ec8dae63b08a76cd395a'/>
<id>urn:sha1:f1a86b35dedba1b7dfa0ec8dae63b08a76cd395a</id>
<content type='text'>
Both copy_file_range() and copy_fallback() can be interrupted before
they have read anything at all, in which case they return -1 and set
errno to EINTR.  If that happens, we should retry, not fail.

PR:		293028
MFC after:	1 week
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D55167

(cherry picked from commit 7aa30669d6e04444b8ad1e4863a6e674fcac4afc)
</content>
</entry>
<entry>
<title>sh: Fix job pointer invalidation with trapsasync</title>
<updated>2026-02-01T14:35:59Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2025-11-17T17:42:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e45b89582fcbf4f65593303bf41a28ed6071460f'/>
<id>urn:sha1:e45b89582fcbf4f65593303bf41a28ed6071460f</id>
<content type='text'>
Calling dotrap() can do almost anything, including reallocating the
jobtab array. Convert the job pointer to an index before calling
dotrap() and then restore a proper job pointer afterwards.

PR:		290330
Reported by:	bdrewery
Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D53793

(cherry picked from commit f44ac8cc9c10d7305223a10b8dbd8e234388cc73)
</content>
</entry>
<entry>
<title>sh: Fix a double free in a rare scenario with pipes</title>
<updated>2026-02-01T14:35:54Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2025-11-15T16:43:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b9cdb4d34bc4ea0093597f2bc4a86ce6ed5ab569'/>
<id>urn:sha1:b9cdb4d34bc4ea0093597f2bc4a86ce6ed5ab569</id>
<content type='text'>
The command
  sh -c 'sleep 3 | sleep 2 &amp; sleep 3 &amp; kill %1; wait %1'
crashes (with appropriate sanitization such as putting
MALLOC_CONF=abort:true,junk:true in the environment or compiling with
-fsanitize=address).

What happens here is that waitcmdloop() calls dowait() with a NULL job
pointer, instructing dowait() to freejob() if it's a non-interactive
shell and $! was not and cannot be referenced for it. However,
waitcmdloop() then uses fields possibly freed by freejob() and calls
freejob() again.

This only occurs if the job being waited for is identified via % syntax
($! has never been referenced for it), it is a pipeline with two or more
elements and another background job has been started before the wait
command. That seems special enough for a bug to remain. Test scripts
written by Jilles would almost always use $! and not % syntax.

We can instead make waitcmdloop() pass its job pointer to dowait(),
fixing up things for that (waitcmdloop() will have to call deljob() if
it does not call freejob()).

The crash from
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290330#c2 appears to
be the same bug.

PR:		290330
Reported by:	bdrewery
Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D53773

(cherry picked from commit 75a6c38e4d5c651b7398bf2bea5baa41a0939e92)
</content>
</entry>
<entry>
<title>sh: avoid warnings about too-long initializer strings</title>
<updated>2026-01-02T20:49:46Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-12-25T20:13:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3015ca9407d14876b1b6e8babc5b94acd939af68'/>
<id>urn:sha1:3015ca9407d14876b1b6e8babc5b94acd939af68</id>
<content type='text'>
Mark `optletter` and `t_op::op_text` as `__non_string`, to avoid
warnings from clang 21 similar to:

    bin/sh/options.h:77:36: error: initializer-string for character array is too long, array size is 19 but initializer has size 20 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
       77 | const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh";
          |                                    ^~~~~~~~~~~~~~~~~~~~~
    bin/test/test.c:153:3: error: initializer-string for character array is too long, array size is 2 but initializer has size 3 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
      153 |         {"==",  STREQ},
          |          ^~~~

MFC after:	3 days
Reviewed by:	jilles
Differential Revision: https://reviews.freebsd.org/D54362

(cherry picked from commit e6546807f4c1a8a6a6fa53fceab7b8c80e3ed802)
</content>
</entry>
<entry>
<title>ln: Simplify sameness checks</title>
<updated>2025-10-08T11:44:39Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-10-07T16:23:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1c541a20989a56a7a93d6243c081f714a7873152'/>
<id>urn:sha1:1c541a20989a56a7a93d6243c081f714a7873152</id>
<content type='text'>
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D52927

(cherry picked from commit 18997fb9eca651a7ef13e6755a4d2cdd3ddede10)
</content>
</entry>
<entry>
<title>cp: Simplify sameness checks</title>
<updated>2025-10-08T11:44:39Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-10-07T16:23:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b0c147af08621b476f5b50905ecf13ba1124228f'/>
<id>urn:sha1:b0c147af08621b476f5b50905ecf13ba1124228f</id>
<content type='text'>
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D52926

(cherry picked from commit 95de78614a57733807c28c05125ed0636309d88b)
</content>
</entry>
<entry>
<title>date(1): Improve manpage around '-I'</title>
<updated>2025-09-04T14:55:50Z</updated>
<author>
<name>Michael Osipov</name>
<email>michaelo@FreeBSD.org</email>
</author>
<published>2025-08-31T20:06:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2e25db21976b04a6c62ba927ed0a8bea583bc07f'/>
<id>urn:sha1:2e25db21976b04a6c62ba927ed0a8bea583bc07f</id>
<content type='text'>
* ISO 8601 defines two formats: basic and extended, clarify that we
  output the extended format only.
* Clarify that ISO 8601 is only aware of timezone /offsets/, not timezones,
  it has no relation to the Olson timezone database (TZ environment variable).

Reviewed by:	otis (mentor), des
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D52314

(cherry picked from commit 21628c79d541b55b5e60231cefec73ca31719b6d)
</content>
</entry>
<entry>
<title>cp: Improve error messages.</title>
<updated>2025-04-20T08:00:24Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-04-15T17:57:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c6cb1b2ee5065ea2eaf725c09b45fd7a249bb4dc'/>
<id>urn:sha1:c6cb1b2ee5065ea2eaf725c09b45fd7a249bb4dc</id>
<content type='text'>
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D49841

(cherry picked from commit 7622e2d21a22f7af65a7145f91ef34179bb6ee03)
</content>
</entry>
<entry>
<title>sh(1): Replace recommendation of use of -e with a note</title>
<updated>2025-03-15T14:01:42Z</updated>
<author>
<name>Michael Osipov</name>
<email>michaelo@FreeBSD.org</email>
</author>
<published>2024-05-03T07:57:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=61df1b78f90681c015fade9b81b40ae1f379e1df'/>
<id>urn:sha1:61df1b78f90681c015fade9b81b40ae1f379e1df</id>
<content type='text'>
This partially reverts b14cfdf665bb8b7b2898a4ee5b073ab87f8ea3d0 and has
been discussed in D42719.

Reviewed by:	jrm (mentor), otis (mentor), mandree, ziaee (manpages)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45073

(cherry picked from commit 7bd8da72c5814b486ae7f492286fe3ac0a5bf03d)
</content>
</entry>
<entry>
<title>sh.1: update history + spdx + linter error</title>
<updated>2024-12-28T18:17:14Z</updated>
<author>
<name>Alexander Ziaee</name>
<email>concussious@runbox.com</email>
</author>
<published>2024-09-29T08:14:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6a03eb1f3028a96a031bf11b2567540b0e9b7f5e'/>
<id>urn:sha1:6a03eb1f3028a96a031bf11b2567540b0e9b7f5e</id>
<content type='text'>
+ increase history consistency by adding "first appeared"
+ remove a skipped new paragraph macro to quiet linter
+ tag spdx

MFC after:	3 days
History source:	www.in-ulm.de/~mascheck/various/ash/#bsd

Reviewed by: mhorne,imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1440

(cherry picked from commit e2a72442bd57c1373c30fab945fbfc86464f3782)
</content>
</entry>
</feed>
