<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/lib/libthr/Makefile, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-05-12T15:22:40Z</updated>
<entry>
<title>Remove tests for obsolete compilers in the build system</title>
<updated>2020-05-12T15:22:40Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2020-05-12T15:22:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=fac6dee9eb58b2b558fec2aea749460ca623f6d6'/>
<id>urn:sha1:fac6dee9eb58b2b558fec2aea749460ca623f6d6</id>
<content type='text'>
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree.
Assume clang is at least 6, which was in 11.2-RELEASE.  Drop conditions
for older compilers.

Reviewed by:	imp (earlier version), emaste, jhb
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D24802
</content>
</entry>
<entry>
<title>Fix initial exec TLS mode for dynamically loaded shared objects.</title>
<updated>2019-03-29T17:52:57Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-03-29T17:52:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=5d00c5a6571cdf533228338fa7ca532c91af1d66'/>
<id>urn:sha1:5d00c5a6571cdf533228338fa7ca532c91af1d66</id>
<content type='text'>
If dso uses initial exec TLS mode, rtld tries to allocate TLS in
static space. If there is no space left, the dlopen(3) fails. If space
if allocated, initial content from PT_TLS segment is distributed to
all threads' pcbs, which was missed and caused un-initialized TLS
segment for such dso after dlopen(3).

The mode is auto-detected either due to the relocation used, or if the
DF_STATIC_TLS dynamic flag is set.  In the later case, the TLS segment
is tried to allocate earlier, which increases chance of the dlopen(3)
to succeed.  LLD was recently fixed to properly emit the flag, ld.bdf
did it always.

Initial test by:	dumbbell
Tested by:	emaste (amd64), ian (arm)
Tested by:	Gerald Aryeetey &lt;aryeeteygerald_rogers.com&gt; (arm64)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D19072
</content>
</entry>
<entry>
<title>revert r341429 "disable BIND_NOW in libc, libthr, and rtld"</title>
<updated>2019-03-28T02:12:32Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-03-28T02:12:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=09b47fc1c285e10c47d3f8ceb543974ce1ce1fc8'/>
<id>urn:sha1:09b47fc1c285e10c47d3f8ceb543974ce1ce1fc8</id>
<content type='text'>
r345620 by kib@ fixed the rtld issue that caused a crash at startup
during resolution of libc's ifuncs with BIND_NOW.

PR:		233333
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Rename rtld-elf/malloc.c to rtld-elf/rtld_malloc.c.</title>
<updated>2019-01-30T16:28:27Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-01-30T16:28:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=d49ca25de64aa563562cc97b750452a8f031c726'/>
<id>urn:sha1:d49ca25de64aa563562cc97b750452a8f031c726</id>
<content type='text'>
Then malloc.c file name is too generic to use it for libthr.a.

Sponsored by:	The FreeBSD Foundation
MFC after:	13 days
</content>
</entry>
<entry>
<title>Untangle jemalloc and mutexes initialization.</title>
<updated>2019-01-29T22:46:44Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-01-29T22:46:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=381c2d2e9a882f8ba03ab84d6fc06f1347866f65'/>
<id>urn:sha1:381c2d2e9a882f8ba03ab84d6fc06f1347866f65</id>
<content type='text'>
The need to use libc malloc(3) from some places in libthr always
caused issues.  For instance, per-thread key allocation was switched to
use plain mmap(2) to get storage, because some third party mallocs
used keys for implementation of calloc(3).

Even more important, libthr calls calloc(3) during initialization of
pthread mutexes, and jemalloc uses pthread mutexes.  Jemalloc provides
some way to both postpone the initialization, and to make
initialization to use specialized allocator, but this is very fragile
and often breaks.  See the referenced PR for another example.

Add the small malloc implementation used by rtld, to libthr. Use it in
thr_spec.c and for mutexes initialization. This avoids the issues with
mutual dependencies between malloc and libthr in principle.  The
drawback is that some more allocations are not interceptable for
alternate malloc implementations.  There should be not too much memory
use from this allocator, and the alternative, direct use of mmap(2) is
obviously worse.

PR:	235211
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D18988
</content>
</entry>
<entry>
<title>disable BIND_NOW in libc, libthr, and rtld</title>
<updated>2018-12-03T15:59:46Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2018-12-03T15:59:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0e450664ad9fef5b9267aefd7bf08ee9d82df2cb'/>
<id>urn:sha1:0e450664ad9fef5b9267aefd7bf08ee9d82df2cb</id>
<content type='text'>
An issue remains with BIND_NOW and processes using threads.  For now,
restore libc's BIND_NOW disable, and also disable BIND_NOW in rtld and
libthr.

A patch is in review (D18400) that likely fixes this issue, but just
disable BIND_NOW pending further testing after it is committed.

PR:		233333
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Remove references to the LIBC_SCCS and SYSLIBC_SCCS C macros.</title>
<updated>2018-05-23T17:05:12Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2018-05-23T17:05:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=9c4a7c50aeebc645b13007066b018cbc802d688e'/>
<id>urn:sha1:9c4a7c50aeebc645b13007066b018cbc802d688e</id>
<content type='text'>
This language dates back to when libthr was libc_r that included its own
syscalls and replaced libc entirely.  It hasn't been relevant for a long
time.
</content>
</entry>
<entry>
<title>Add HAS_TESTS to all Makefiles that are currently using the</title>
<updated>2017-08-02T08:50:42Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-08-02T08:50:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=d511b20a693d77c1dc2491a62124471361eddd8e'/>
<id>urn:sha1:d511b20a693d77c1dc2491a62124471361eddd8e</id>
<content type='text'>
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
</content>
</entry>
<entry>
<title>Convert traditional ${MK_TESTS} conditional idiom for including test</title>
<updated>2017-08-02T08:35:51Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-08-02T08:35:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=4b330699f819a81d8e34d471225143ffeb321855'/>
<id>urn:sha1:4b330699f819a81d8e34d471225143ffeb321855</id>
<content type='text'>
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
</content>
</entry>
<entry>
<title>libthr: increase WARNS to the default (6)</title>
<updated>2017-05-26T15:57:54Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2017-05-26T15:57:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=afba14e2b85463b8dedde7dad5957251cc216513'/>
<id>urn:sha1:afba14e2b85463b8dedde7dad5957251cc216513</id>
<content type='text'>
...and silence cast-align warnings from gcc.

Reviewed by:	kib
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10935
</content>
</entry>
</feed>
