1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00
freebsd/contrib/llvm-project
Dimitry Andric 4c9a0adad1 compiler-rt: avoid segfaults when re-exec'ing with ASLR
After 930a7c2ac6 ("compiler-rt: re-exec with ASLR disabled when
necessary") and 96fe7c8ab0 ("compiler-rt: support ReExec() on
FreeBSD"), binaries linked against the sanitizer libraries may segfault
due to procctl(2) being intercepted. Instead, the non-intercepted
internal_procctl() should be called.

Similarly, the ReExec() function that re-executes the binary after
turning off ASLR should not call elf_aux_info(3) and realpath(3), since
these will also be intercepted. Instead, loop directly over the elf aux
info vector to find the executable path, and avoid calling realpath(3)
since it is actually unwanted for this use case.

Fixes:		930a7c2ac6, 96fe7c8ab0
MFC after:	3 days
2023-11-22 19:23:06 +01:00
..
clang arm64 lib32: change clang to allow -m32 on arm64 2023-07-25 18:58:51 -05:00
compiler-rt compiler-rt: avoid segfaults when re-exec'ing with ASLR 2023-11-22 19:23:06 +01:00
libcxx Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser): 2023-11-14 18:34:45 -08:00
libunwind Merge llvm-project release/16.x llvmorg-16.0.2-0-g18ddebe1a1a9 2023-06-22 20:22:28 +02:00
lld Merge llvm-project release/16.x llvmorg-16.0.5-0-g185b81e034ba 2023-06-22 20:22:50 +02:00
lldb Merge llvm-project release/16.x llvmorg-16.0.3-0-gda3cd333bea5 2023-06-22 20:22:35 +02:00
llvm Merge commit 8757ce490130 from llvm-project (by Simon Pilgrim): 2023-07-16 20:45:29 +02:00
openmp
FREEBSD-Xlist