<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2022-04-14T06:41:24Z</updated>
<entry>
<title>getenv(3): Fix two typos in source code comments</title>
<updated>2022-04-14T06:41:24Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-04-09T09:36:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=77f4623d41d442de7f87c50c4a256f5dfcd39658'/>
<id>urn:sha1:77f4623d41d442de7f87c50c4a256f5dfcd39658</id>
<content type='text'>
- s/peform/perform/

(cherry picked from commit 8dcf5860b369559ba176f5dc0d7ed278f8aecf38)
</content>
</entry>
<entry>
<title>Fix null pointer subtraction in mergesort()</title>
<updated>2021-08-31T19:11:00Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2021-08-27T17:45:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a2ddb544867a6100fc4b684772897134511bb72c'/>
<id>urn:sha1:a2ddb544867a6100fc4b684772897134511bb72c</id>
<content type='text'>
Clang 13 produces the following warning for this function:

lib/libc/stdlib/merge.c:137:41: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
        if (!(size % ISIZE) &amp;&amp; !(((char *)base - (char *)0) % ISIZE))
                                               ^ ~~~~~~~~~

This is meant to check whether the size and base parameters are aligned
to the size of an int, so use our __is_aligned() macro instead.

Also remove the comment that indicated this "stupid subtraction" was
done to pacify some ancient and unknown Cray compiler, and which has
been there since the BSD 4.4 Lite Lib Sources were imported.

(cherry picked from commit 4e5d32a445f90d37966cd6de571978551654e3f3)
</content>
</entry>
<entry>
<title>MFC r366770: libc: typo fix (s/involes/involves)</title>
<updated>2020-11-14T02:11:56Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-11-14T02:11:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5805a3a0cd59716b5da8e9d8207c6b00300d15fc'/>
<id>urn:sha1:5805a3a0cd59716b5da8e9d8207c6b00300d15fc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MFC r366781, r366866: Implement ptsname_r.</title>
<updated>2020-11-09T01:52:15Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2020-11-09T01:52:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6f9ff71eb7a0452cafc48f037f620f8ae9265dda'/>
<id>urn:sha1:6f9ff71eb7a0452cafc48f037f620f8ae9265dda</id>
<content type='text'>
</content>
</entry>
<entry>
<title>MFC 365276: Compute the correct size of the string to move forward.</title>
<updated>2020-09-16T22:55:27Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2020-09-16T22:55:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=59b28017d24a48dfe852b45a1c60e7792dca2a9a'/>
<id>urn:sha1:59b28017d24a48dfe852b45a1c60e7792dca2a9a</id>
<content type='text'>
Previously this was counting the amount of spare room at the start of
the buffer that the string needed to move forward and passing that as
the number of bytes to copy to memmove rather than the length of the
string to be copied.

In the strfmon test in the test suite this caused the memmove to
overflow the allocated buffer by one byte which CHERI caught.
</content>
</entry>
<entry>
<title>MFC r365371:</title>
<updated>2020-09-12T16:50:04Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2020-09-12T16:50:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0428ad50794f234e056c0625673d1cf98c5a7ade'/>
<id>urn:sha1:0428ad50794f234e056c0625673d1cf98c5a7ade</id>
<content type='text'>
Turn MALLOC_PRODUCTION into a regular src.conf(5) option

For historical reasons, defining MALLOC_PRODUCTION in /etc/make.conf has
been used to turn off potentially expensive debug checks and statistics
gathering in the implementation of malloc(3).

It seems more consistent to turn this into a regular src.conf(5) option,
e.g. WITH_MALLOC_PRODUCTION / WITHOUT_MALLOC_PRODUCTION. This can then
be toggled similar to any other source build option, and turned on or
off by default for e.g. stable branches.

Reviewed by:	imp, #manpages
Differential Revision: https://reviews.freebsd.org/D26337

MFC r365373:

Follow-up r365371 by removing sentences which indicate the state of the
MK_MALLOC_PRODUCTION option on -CURRENT.

Also, for the sake of backwards compatibility, support the old way of
enabling 'production malloc', e.g. by adding a define in make.conf(5).
</content>
</entry>
<entry>
<title>MFC r359547, r359629 (by imp): Note some functions that appeared in First Edition Unix</title>
<updated>2020-08-01T14:22:05Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2020-08-01T14:22:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=43284b5b01b52a87c05f38bd266e1db7afc02746'/>
<id>urn:sha1:43284b5b01b52a87c05f38bd266e1db7afc02746</id>
<content type='text'>
These functions first appeared in the First Edition of Unix (or earlier in the
pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too
fragmented at this point to extend history that far back.
</content>
</entry>
<entry>
<title>MFC r359772 (by carlavilla): exit(3): Add a HISTORY section</title>
<updated>2020-08-01T14:00:47Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2020-08-01T14:00:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1ee0e094d2439be1fde63240bcbe54fcb65e3bfc'/>
<id>urn:sha1:1ee0e094d2439be1fde63240bcbe54fcb65e3bfc</id>
<content type='text'>
PR:		240259
Submitted by:	gbe
Reviewed by:	bcr
Approved by:	bcr
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D24146
</content>
</entry>
<entry>
<title>MFC r361249:</title>
<updated>2020-05-24T10:16:47Z</updated>
<author>
<name>Benedict Reuschling</name>
<email>bcr@FreeBSD.org</email>
</author>
<published>2020-05-24T10:16:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3962fde9a455dd896343cbbdd010c8b086fbe877'/>
<id>urn:sha1:3962fde9a455dd896343cbbdd010c8b086fbe877</id>
<content type='text'>
Fix a typo: argments -&gt; arguments

PR:		243294
Submitted by:	Igor Ostapenko
MFC after:	5 days
</content>
</entry>
<entry>
<title>MFC r350091:</title>
<updated>2019-07-24T06:29:19Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-07-24T06:29:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0dbe011e2d05c74a7daf20e2e1bbf40ee7327923'/>
<id>urn:sha1:0dbe011e2d05c74a7daf20e2e1bbf40ee7327923</id>
<content type='text'>
bsearch.3: Improve the example
</content>
</entry>
</feed>
