<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=main</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2026-08-06T22:51:25Z</updated>
<entry>
<title>fts: fix fts_accpath regression after fts_children()</title>
<updated>2026-08-06T22:51:25Z</updated>
<author>
<name>Jitendra Bhati</name>
<email>bhatijitendra2022@gmail.com</email>
</author>
<published>2026-08-04T19:40:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=74bd6fb1eb028d15df407efb62628253dab90aa5'/>
<id>urn:sha1:74bd6fb1eb028d15df407efb62628253dab90aa5</id>
<content type='text'>
When fts_children() is called, sp-&gt;fts_child is set. On the
next fts_read() call, fts_safe_changedir() was incorrectly
passed p-&gt;fts_dirfd (pointing to the parent directory) instead
of -1. This caused fts to fchdir to the parent instead of the
child directory, silently skipping the contents of 3rd-level
subdirectories. This was observed as a failure in
nmtree_test:mtree_create which calls fts_children() internally.

Add regression test accpath_correct_after_descent that calls
fts_children() on each directory entry and verifies files at
depth 3 are still visited correctly. The test fails with the
unfixed libc and passes with the fix.

Reported by:	Herbert J. Skuhra &lt;herbert@gojira.at&gt;
Sponsored by:	Google LLC (GSoC 2026)
Reviewed by:	asomers
Fixes:		4bd01d6ae01 ("fts: refactor to use fd-relative")
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2354
</content>
</entry>
<entry>
<title>kern/tty.c: Exterrorize returns</title>
<updated>2026-08-05T14:46:45Z</updated>
<author>
<name>Gleb Popov</name>
<email>arrowd@FreeBSD.org</email>
</author>
<published>2026-08-03T19:23:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=62ccaec3dba6272590d97cc0aa0df28fd3d08d1c'/>
<id>urn:sha1:62ccaec3dba6272590d97cc0aa0df28fd3d08d1c</id>
<content type='text'>
Approved by:	kib
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2349
</content>
</entry>
<entry>
<title>manuals: Fix more Fx and nearby mechanical typos</title>
<updated>2026-08-04T14:04:23Z</updated>
<author>
<name>Alexander Ziaee</name>
<email>ziaee@FreeBSD.org</email>
</author>
<published>2026-08-04T14:04:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=82c013fb59114b228cbc59536914be1c1772c69c'/>
<id>urn:sha1:82c013fb59114b228cbc59536914be1c1772c69c</id>
<content type='text'>
Fix compiler warnings related to the Fx macro, as well as all other
mechanical typos that were visible within one screenful of them. These
cause rendering glitches on various toolchains with various of the five
and a half decades of rich output formats and tooling manpages scale to.

The *x macro set specifies operating systems. These macros take the rest
of the line as an argument. Sometimes, a space was not used to separate
the argument of Fx and the trailing period. Others had other parts of
the sentence supplied as an argument to Fx.

While here, fix the other mechanical typos visible on those specific
screenfulls. Correct section typo AUTHOR to AUTHORS, markup utilities
with Sy, and apply line break after the end of a sentence.

PR:		297248
MFC after:	3 days
Reported by:	wosch (are you sure that's all of the broken Fx'es?)
Fixes:		ff2bc641599a ("Fix Fx and nearby mechanical typos")
Fixes:          d790b16bbf0c ("add man pages for stdbit functions")
Fixes:		6c57e368eb17 ("implement C23 memalignment()")
Fixes:		b06338167d64 ("ROUTE_MPATH and FIB_ALGO")
Fixes:		7e1affa242ca ("revise divert-to and divert-reply")
</content>
</entry>
<entry>
<title>manuals: Fix Fx and nearby mechanical typos</title>
<updated>2026-08-04T00:32:36Z</updated>
<author>
<name>Alexander Ziaee</name>
<email>ziaee@FreeBSD.org</email>
</author>
<published>2026-08-03T23:31:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ff2bc641599a7845f597ad02ccfc98c5467fa948'/>
<id>urn:sha1:ff2bc641599a7845f597ad02ccfc98c5467fa948</id>
<content type='text'>
Fix compiler warnings related to the Fx macro, as well as all other
mechanical typos that were visible within one screenful of them. These
cause rendering glitches on various toolchains with various of the five
and a half decades of rich output formats and tooling manpages scale to.

The *x macro set specifies operating systems. These macros take the rest
of the line as an argument. Sometimes, a space was not used to separate
the argument of Fx and the trailing period. Another, FreeBSD Foundation
was misrepresented as an operating system version instead of an author.
Two more had other parts of the sentence supplied as an argument to Fx.

While I had those open, fix the other mechancial typos visible on those
specific screenfulls. Fix a list width glitch, correct section typo
AUTHOR to AUTHORS, and switch AUTHORS sections containing prose to
prose-mode so that they wrap freely when rendered.

PR:		297248
MFC after:	3 days
Fixes:		d39e310c7d6a ("man/man3: add stdbit.3")
Fixes:		d790b16bbf0c ("add man pages for stdbit functions")
Fixes:		b61850c4e6f6 ("net.link.bridge.member_ifaddrs to false")
Reported by:	wosch (groff is complaining about incorrect Fx usage)
</content>
</entry>
<entry>
<title>uexterr_gettext(3): support dynamic kernel categories</title>
<updated>2026-08-03T21:43:23Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2026-08-03T16:50:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5dff273d680ab848c62ca50efacb19f199217ab7'/>
<id>urn:sha1:5dff273d680ab848c62ca50efacb19f199217ab7</id>
<content type='text'>
Add an uncached sysctl based implementation which retrieves individual
categories.  A cache would be an obvious extension should this optional
feature that can only be enabled by an environmental varible have a
noticable performance impact in a case that matters.

Reviewed by:	kib
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D58238
</content>
</entry>
<entry>
<title>exterror(9): split category into multiple sources</title>
<updated>2026-08-03T21:43:22Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2026-08-03T16:48:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bbf95a9b8481e41a99b301e12338e1cda6915a01'/>
<id>urn:sha1:bbf95a9b8481e41a99b301e12338e1cda6915a01</id>
<content type='text'>
The static, global index into an array of strings is simple, cheap,
and works for the base kernel, but is unworkable for (potentially
third-party) kernel modules or for arbitrary userspace code.  Swipe a
few of the top bits of category to indicate a source with all-zeros
being the current model (EXTERR_CAT_SRC_KERN_STATIC).  Add two
additional sources EXTERR_CAT_SRC_KERN_DYNAMIC and EXTERR_CAT_SRC_USER
with stub implementations.

Reviewed by:	kib
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D58236
</content>
</entry>
<entry>
<title>fts: refactor to use fd-relative operations internally</title>
<updated>2026-08-03T19:12:28Z</updated>
<author>
<name>Jitendra Bhati</name>
<email>bhatijitendra2022@gmail.com</email>
</author>
<published>2026-06-12T17:07:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4bd01d6ae01632501b63438b8d9a401db9744a78'/>
<id>urn:sha1:4bd01d6ae01632501b63438b8d9a401db9744a78</id>
<content type='text'>
Replace all _open() calls with _openat() in __fts_open(), fts_read(),
and fts_children().  Replace statfs() with _fstatfs().

Add fts_dirfd to struct _ftsent, set to the file descriptor of the
parent directory. Callers can use openat(ent-&gt;fts_dirfd, ent-&gt;fts_name,
...) to access files safely without relying on fts_accpath, which
enables programs in capability mode to open the files described by
_ftsent.

This is a preparatory change for fts_openat() which will allow callers
to provide a pre-opened directory fd, enabling fts(3) traversal inside
Capsicum capability mode.

Mirror all fts_open() changes to fts_open_b().

As a result of expanding _ftsend, publish new ELF symbol versions for
fts_openat and related functions.

Sponsored by:	Google LLC (GSoC 2026)
Reviewed by:	asomers
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2303
</content>
</entry>
<entry>
<title>libc: getopt{,_long}: Const correctness for C23</title>
<updated>2026-08-03T14:02:51Z</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2026-08-03T14:02:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f1d98862044f7748c6f930e9d4339abc166a5b16'/>
<id>urn:sha1:f1d98862044f7748c6f930e9d4339abc166a5b16</id>
<content type='text'>
On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks getopt during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the pointed-to value is never modified, fix this by making
the pointer const.

MFC after:	1 week
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58488
</content>
</entry>
<entry>
<title>libc: Add strfromd, strfromf, and strfroml per C23</title>
<updated>2026-08-02T12:10:02Z</updated>
<author>
<name>Faraz Vahedi</name>
<email>kfv@kfv.io</email>
</author>
<published>2026-06-27T13:34:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f68d7bfc1479042184e09431bd55771c50c47f68'/>
<id>urn:sha1:f68d7bfc1479042184e09431bd55771c50c47f68</id>
<content type='text'>
strfromd(), strfromf(), and strfroml() are implemented directly
in terms of gdtoa.  If a non-conforming format string is passed,
the string "EDOOFUS" is returned and errno set to EDOOFUS as an
extension.

Reviewed by:	fuz
MFC after:	1 month
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2301
Signed-off-by:	Faraz Vahedi &lt;kfv@kfv.io&gt;
</content>
</entry>
<entry>
<title>libc/merge.c: use memcpy() for copying</title>
<updated>2026-08-02T11:17:45Z</updated>
<author>
<name>Minsoo Choo</name>
<email>minsoochoo0122@proton.me</email>
</author>
<published>2026-07-02T19:47:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=00a79975c062650ba15e432e30776d42fc44fbaa'/>
<id>urn:sha1:00a79975c062650ba15e432e30776d42fc44fbaa</id>
<content type='text'>
Currently mergesort() uses ICOPY_*() to copy data as four byte blocks
instead of one byte. However, this is only achievable when both size and
base arguments are aligned to four bytes.

Use of memcpy() is ideal as 1) it is cleaner and 2) the library will use
SIMD for copying when the hardware supports it. Compared to ICOPY_*(),
SIMD can support up to 64 bytes. When the SIMD-backed memcpy() find the
address is unaligned, it can first copy data up to the nearest aligned
address, and then use SIMD operations for faster transfer. Thus memcpy()
can give better performance than mergesort()'s own implementation.

This is benchmarked on amd64 where there isn't a SIMD-backed
implementation yet. However, the baseline implementation in assembly
already delivers better performance in unaligned cases although there is
some performance drops in aligned cases. The benchmark results and
script is available in the Phabricator review. Ideally, more performance
improvements will come when amd64 gets SIMD implementation of memcpy().

Signed-off-by:	Minsoo Choo &lt;minsoochoo0122@proton.me&gt;
Reviewed by:	fuz
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D58002
</content>
</entry>
</feed>
