<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/lib/libc/string, branch master</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=master</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2020-12-18T22:10:17Z</updated>
<entry>
<title>strerror.3: Fix whitespace issue introduced in r368714</title>
<updated>2020-12-18T22:10:17Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2020-12-18T22:10:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ccb86b40c172e14b454b44ca52750c24939355ea'/>
<id>urn:sha1:ccb86b40c172e14b454b44ca52750c24939355ea</id>
<content type='text'>
MFC with:	368714
</content>
</entry>
<entry>
<title>strerror.3: Add an example for perror()</title>
<updated>2020-12-17T12:41:47Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2020-12-17T12:41:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=87394cdd011a57807fe044046476981f2b0142c2'/>
<id>urn:sha1:87394cdd011a57807fe044046476981f2b0142c2</id>
<content type='text'>
This is a nice and quick reference.

Reviewed by:	jilles, yuripv
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D27623
</content>
</entry>
<entry>
<title>Implement strerror_l().</title>
<updated>2020-12-16T09:02:09Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-12-16T09:02:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=675079b1ea61b310f3a42cb0d352a49c1780f89a'/>
<id>urn:sha1:675079b1ea61b310f3a42cb0d352a49c1780f89a</id>
<content type='text'>
Only for the arches that provide user-mode TLS.

PR: 251651
Requested by:	yuri
Discussed with:	emaste, jilles, tijl
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D27495
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>strdup.3: Function appeared in 4.3BSD-Reno, not 4.4BSD</title>
<updated>2020-12-14T00:50:45Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2020-12-14T00:50:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=87973534d2d67df59309d206a18fbdb256b589dd'/>
<id>urn:sha1:87973534d2d67df59309d206a18fbdb256b589dd</id>
<content type='text'>
Linux claims 4.3BSD, we claim 4.4BSD and OpenBSD claims 4.3BSD-Reno. It turns
out that OpenBSD got it right: the function was added in late 1988 a few months
after 4.3BSD-Tahoe, well in advance of 4.3BSD-Reno.

Reviewed by:	bcr
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D27392
</content>
</entry>
<entry>
<title>libc: fix undefined behavior from signed overflow in strstr and memmem</title>
<updated>2020-11-19T00:03:15Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-11-19T00:03:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=33482dae89c26158a22ccb3b7f2ca6e6652f29b4'/>
<id>urn:sha1:33482dae89c26158a22ccb3b7f2ca6e6652f29b4</id>
<content type='text'>
unsigned char promotes to int, which can overflow when shifted left by
24 bits or more. this has been reported multiple times but then
forgotten. it's expected to be benign UB, but can trap when built with
explicit overflow catching (ubsan or similar). fix it now.

note that promotion to uint32_t is safe and portable even outside of
the assumptions usually made in musl, since either uint32_t has rank
at least unsigned int, so that no further default promotions happen,
or int is wide enough that the shift can't overflow. this is a
desirable property to have in case someone wants to reuse the code
elsewhere.

musl commit: 593caa456309714402ca4cb77c3770f4c24da9da

Obtained from:	musl
</content>
</entry>
<entry>
<title>libc: optimize memmem two-way bad character shift</title>
<updated>2020-11-19T00:02:12Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-11-19T00:02:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7dbcd06e63101d51e6a777f7315cfde794411e53'/>
<id>urn:sha1:7dbcd06e63101d51e6a777f7315cfde794411e53</id>
<content type='text'>
first, the condition (mem &amp;&amp; k &lt; p) is redundant, because mem being
nonzero implies the needle is periodic with period exactly p, in which
case any byte that appears in the needle must appear in the last p
bytes of the needle, bounding the shift (k) by p.

second, the whole point of replacing the shift k by mem (=l-p) is to
prevent shifting by less than mem when discarding the memory on shift,
in which case linear time could not be guaranteed. but as written, the
check also replaced shifts greater than mem by mem, reducing the
benefit of the shift. there is no possible benefit to this reduction of
the shift; since mem is being cleared, the full shift is valid and
more optimal. so only replace the shift by mem when it would be less
than mem.

musl commits:
8f5a820d147da36bcdbddd201b35d293699dacd8
122d67f846cb0be2c9e1c3880db9eb9545bbe38c

Obtained from:	musl
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>clang-format libc string functions imported from musl</title>
<updated>2020-11-18T22:01:34Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-11-18T22:01:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4874ddfd373c582d9cd7fe915d2259295d75d1e5'/>
<id>urn:sha1:4874ddfd373c582d9cd7fe915d2259295d75d1e5</id>
<content type='text'>
We have adopted these and don't consider them 'contrib' code, so bring
them closer to style(9).  This is a followon to r315467 and r351700.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>strtok(3): make it easier to find the RETURN VALUES section</title>
<updated>2020-06-22T11:03:36Z</updated>
<author>
<name>Piotr Pawel Stefaniak</name>
<email>pstef@FreeBSD.org</email>
</author>
<published>2020-06-22T11:03:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=2abf05c4c6a2ed9345c09e6009baac624075569a'/>
<id>urn:sha1:2abf05c4c6a2ed9345c09e6009baac624075569a</id>
<content type='text'>
MFC after:	1 week
</content>
</entry>
<entry>
<title>libc manpages: various improvements from NetBSD</title>
<updated>2020-06-14T05:59:30Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2020-06-14T05:59:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e0f7c06de24828c83c424b6caba8b7e5fe75f5b2'/>
<id>urn:sha1:e0f7c06de24828c83c424b6caba8b7e5fe75f5b2</id>
<content type='text'>
- Add STANDARDS and HISTORY sections within the appropriate manpages
- Mention two USENIX papers within kqueue(2) and strlcpy(3)

Reviewed by:	bcr (mentor)
Approved by:	bcr (mentor)
Obtained from:	NetBSD
MFC after:	7 days
Differential Revision: https://reviews.freebsd.org/D24650
</content>
</entry>
<entry>
<title>strdup.3: Slightly canonicalize OOM return/error status</title>
<updated>2020-05-05T17:57:04Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2020-05-05T17:57:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b34f8412c503f620d86e8a2d47cf70af515aad78'/>
<id>urn:sha1:b34f8412c503f620d86e8a2d47cf70af515aad78</id>
<content type='text'>
Attempted to clean up the language around "this is a malloc'd object."  May be
passed as a parameter to free(3) is a bit obtuse.

Sponsored by:	Dell EMC Isilon
</content>
</entry>
</feed>
