|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0 |
|
| #
91c1c361 |
| 06-Mar-2024 |
Konstantin Belousov <[email protected]> |
libthr: remove explicit sys/cdefs.h includes
(cherry picked from commit f8bbbce458194ff4312c610d32a64ff4a3a71d45)
|
|
Revision tags: release/13.3.0, release/14.0.0 |
|
| #
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| #
642cd511 |
| 07-Jul-2023 |
Greg Becker <[email protected]> |
libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS
This patch fixes a bug which prevents building libthr without _PTHREADS_INVARIANTS defined. The default remains to build libthr with -D_PTHR
libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS
This patch fixes a bug which prevents building libthr without _PTHREADS_INVARIANTS defined. The default remains to build libthr with -D_PTHREADS_INVARIANTS. However, with this patch, if one builds libthr with WITHOUT_PTHREADS_ASSERTIONS=true then the latency to acquire+release a default pthread mutex is reduced by roughly 5%, and a robust mutex by roughly 18% (as measured by a simple synthetic test on a Xeon E5-2697a based machine).
Reviewed by: jhb, kib, mjg MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40900
show more ...
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
| #
bbf4df17 |
| 10-Feb-2022 |
John Baldwin <[email protected]> |
libthr: Disable stack unwinding on ARM.
When a thread exits, _Unwind_ForcedUnwind() is used to walk up stack frames executing pending cleanups pushed by pthread_cleanup_push(). The cleanups are popp
libthr: Disable stack unwinding on ARM.
When a thread exits, _Unwind_ForcedUnwind() is used to walk up stack frames executing pending cleanups pushed by pthread_cleanup_push(). The cleanups are popped by thread_unwind_stop() which is passed as a callback function to _Unwind_ForcedUnwind().
LLVM's libunwind uses a different function type for the callback on 32-bit ARM relative to all other platforms. The previous unwind.h header (as well as the unwind.h from libcxxrt) use the non-ARM type on all platforms, so this has likely been broken on 32-bit arm since it switched to using LLVM's libunwind.
For now, just disable stack unwinding on 32-bit arm to unbreak the build until a proper fix is tested.
show more ...
|
| #
c00d3456 |
| 10-Feb-2022 |
John Baldwin <[email protected]> |
Install unwind.h into /usr/include
Install headers from LLVM's libunwind in place of the headers from libcxxrt and allow C applications to use the library.
As part of this, remove include/unwind.h
Install unwind.h into /usr/include
Install headers from LLVM's libunwind in place of the headers from libcxxrt and allow C applications to use the library.
As part of this, remove include/unwind.h and switch libthr over to using the installed unwind.h.
Reviewed by: dim, emaste MFC after: 10 days Differential Revision: https://reviews.freebsd.org/D34065
show more ...
|
|
Revision tags: release/12.3.0 |
|
| #
9efbe526 |
| 02-Aug-2021 |
Alex Richardson <[email protected]> |
libthr: work around an ASAN false-positive
I got the following error with an ASAN-instrument libthr:
==803==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffffffcdb0 at pc 0x00080186
libthr: work around an ASAN false-positive
I got the following error with an ASAN-instrument libthr:
==803==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffffffcdb0 at pc 0x000801863396 bp 0x7ff8 READ of size 4 at 0x7fffffffcdb0 thread T0 #0 0x801863395 in handle_signal /local/scratch/alr48/cheri/freebsd/lib/libthr/thread/thr_sig.c:262:2 #1 0x801860da2 in thr_sighandler /local/scratch/alr48/cheri/freebsd/lib/libthr/thread/thr_sig.c:246:2
Address 0x7fffffffcdb0 is located in stack of thread T0 at offset 208 in frame #0 0x80186080f in thr_sighandler /local/scratch/alr48/cheri/freebsd/lib/libthr/thread/thr_sig.c:213
This frame has 1 object(s): [32, 64) 'act' (line 216) <== Memory access at offset 208 overflows this variable HINT: this may be a false positive if your program uses some custom stack
This seems like a false-positive since the line in question is `SIGSETOR(actp->sa_mask, ucp->uc_sigmask);` and it complains about a read operation (from the ucontext_t argument) so this indicates to me that ASAN does not understand that thr_sighandler() is a signal handler.
Differential Revision: https://reviews.freebsd.org/D31074
show more ...
|
|
Revision tags: release/13.0.0 |
|
| #
c8c62548 |
| 22-Mar-2021 |
Alex Richardson <[email protected]> |
Don't add -Winline for WARNS=6
This warning is very rarely useful (inline is a hint and not mandatory). This flag results in many warnings being printed when compiling C++ code that uses the standar
Don't add -Winline for WARNS=6
This warning is very rarely useful (inline is a hint and not mandatory). This flag results in many warnings being printed when compiling C++ code that uses the standard library with GCC.
This flag was originally added in back in r94332 but the flag is a no-op in Clang ("This diagnostic flag exists for GCC compatibility, and has no effect in Clang"). Removing it should make the GCC build output slightly more readable.
Reviewed By: jrtc27, imp Differential Revision: https://reviews.freebsd.org/D29235
show more ...
|
|
Revision tags: release/12.2.0, release/11.4.0 |
|
| #
fac6dee9 |
| 12-May-2020 |
Eric van Gyzen <[email protected]> |
Remove tests for obsolete compilers in the build system
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 f
Remove tests for obsolete compilers in the build system
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
show more ...
|
|
Revision tags: release/12.1.0, release/11.3.0 |
|
| #
5d00c5a6 |
| 29-Mar-2019 |
Konstantin Belousov <[email protected]> |
Fix initial exec TLS mode for dynamically loaded shared objects.
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 spa
Fix initial exec TLS mode for dynamically loaded shared objects.
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 <aryeeteygerald_rogers.com> (arm64) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D19072
show more ...
|
| #
09b47fc1 |
| 28-Mar-2019 |
Ed Maste <[email protected]> |
revert r341429 "disable BIND_NOW in libc, libthr, and rtld"
r345620 by kib@ fixed the rtld issue that caused a crash at startup during resolution of libc's ifuncs with BIND_NOW.
PR: 233333 Sponsor
revert r341429 "disable BIND_NOW in libc, libthr, and rtld"
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
show more ...
|
| #
d49ca25d |
| 30-Jan-2019 |
Konstantin Belousov <[email protected]> |
Rename rtld-elf/malloc.c to rtld-elf/rtld_malloc.c.
Then malloc.c file name is too generic to use it for libthr.a.
Sponsored by: The FreeBSD Foundation MFC after: 13 days
|
| #
381c2d2e |
| 29-Jan-2019 |
Konstantin Belousov <[email protected]> |
Untangle jemalloc and mutexes initialization.
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(
Untangle jemalloc and mutexes initialization.
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
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
0e450664 |
| 03-Dec-2018 |
Ed Maste <[email protected]> |
disable BIND_NOW in libc, libthr, and rtld
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 pat
disable BIND_NOW in libc, libthr, and rtld
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
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
9c4a7c50 |
| 23-May-2018 |
John Baldwin <[email protected]> |
Remove references to the LIBC_SCCS and SYSLIBC_SCCS C macros.
This language dates back to when libthr was libc_r that included its own syscalls and replaced libc entirely. It hasn't been relevant f
Remove references to the LIBC_SCCS and SYSLIBC_SCCS C macros.
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.
show more ...
|
|
Revision tags: release/10.4.0 |
|
| #
d511b20a |
| 02-Aug-2017 |
Enji Cooper <[email protected]> |
Add HAS_TESTS to all Makefiles that are currently using the `SUBDIR.${MK_TESTS}+= tests` idiom.
This is a follow up to r321912.
|
| #
4b330699 |
| 02-Aug-2017 |
Enji Cooper <[email protected]> |
Convert traditional ${MK_TESTS} conditional idiom for including test directories to SUBDIR.${MK_TESTS} idiom
This is being done to pave the way for future work (and homogenity) in ^/projects/make-ch
Convert traditional ${MK_TESTS} conditional idiom for including test 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
show more ...
|
|
Revision tags: release/11.1.0 |
|
| #
afba14e2 |
| 26-May-2017 |
Eric van Gyzen <[email protected]> |
libthr: increase WARNS to the default (6)
...and silence cast-align warnings from gcc.
Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D
libthr: increase WARNS to the default (6)
...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
show more ...
|
| #
cfc1010f |
| 22-May-2017 |
Eric van Gyzen <[email protected]> |
Revert r318583 (libthr: use default WARNS level of 6)
Revert this while I fix RISC-V, SPARC, and probably all architectures that use GCC.
Reported by: kib Pointy hat to: vangyzen Sponsored by: Dell
Revert r318583 (libthr: use default WARNS level of 6)
Revert this while I fix RISC-V, SPARC, and probably all architectures that use GCC.
Reported by: kib Pointy hat to: vangyzen Sponsored by: Dell EMC
show more ...
|
| #
0b2f3f20 |
| 20-May-2017 |
Eric van Gyzen <[email protected]> |
libthr: Use CLI flags instead of pragmas to disable warnings
People tweaking the build system or compilers tend to look into the Makefile and not into the source. Having some warning controls in th
libthr: Use CLI flags instead of pragmas to disable warnings
People tweaking the build system or compilers tend to look into the Makefile and not into the source. Having some warning controls in the Makefile and some in the source code is surprising.
Pragmas have the advantage that they leave the warnings enabled for more code, but that advantage isn't very relevant in these cases.
Requested by: kib Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832
show more ...
|
| #
d71b2897 |
| 20-May-2017 |
Eric van Gyzen <[email protected]> |
libthr: use default WARNS level of 6
Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832
|
| #
6eccf6e3 |
| 20-May-2017 |
Eric van Gyzen <[email protected]> |
libthr: disable thread-safety warnings
These warnings don't make sense for code that implements the locking primitives.
Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revisi
libthr: disable thread-safety warnings
These warnings don't make sense for code that implements the locking primitives.
Reviewed by: kib MFC after: 3 days Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10832
show more ...
|
| #
58368ba9 |
| 20-Jan-2017 |
Enji Cooper <[email protected]> |
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
This implifies pathing in make/displayed output
MFC after: 3 weeks Sponsored by: Dell EMC Isilon
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0 |
|
| #
e13c6045 |
| 21-Mar-2016 |
Konstantin Belousov <[email protected]> |
Fix typo.
MFC after: 3 days
|
| #
c389411c |
| 05-Feb-2016 |
Glen Barber <[email protected]> |
Remove libc, librtld_db, libthr packages, and further increase the constraints on what needs to be installed in a specific to maintain consistency during upgrades.
Create a new clibs package contain
Remove libc, librtld_db, libthr packages, and further increase the constraints on what needs to be installed in a specific to maintain consistency during upgrades.
Create a new clibs package containing libraries that are needed as a bare minimum for consistency.
With much help and input from: kib Sponsored by: The FreeBSD Foundation
show more ...
|
| #
a70cba95 |
| 04-Feb-2016 |
Glen Barber <[email protected]> |
First pass through library packaging.
Sponsored by: The FreeBSD Foundation
|