compiler-rt: intercept fortified read/pread wrappers (#206228)
Add TSAN/common interceptors for glibc fortified read/pread calls, so
that they follow the same blocking and signal-handling path as the plain
libc symbols.
The regression test from https://github.com/llvm/llvm-project/pull/77789
for `read`, when compiled with `-D_FORTIFY_SOURCE=3` fails without the
new interceptors.
I have a regression test for pread(64) as well, but I am not sure if
there is much value in adding it.
I've added a read smoke test in sanitizer common.
---------
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_ at 721217.xyz>
[NFC][analyzer] Improve code quality in VisitBinaryOperator (#205151)
I started out to remove the `NodeBuilder` in
`ExprEngine::VisitBinaryOperator` (as a part of my commit series that
removes `NodeBuilder`s), but I noticed that this method is full of
technical debt, so I decided to do a through clean-up (which includes
the removal of the trivial `NodeBuilder`).
[PGO] Fix malformed raw profile test (#206738)
A hand-written raw profile test still wrote one extra word in the data
record after the raw profile format changed.
Remove the extra word so the name section starts at the offset expected
by the reader. This keeps the test focused on the trailing garbage that
should report that there is not enough space for another header.
Buildbot failure:
https://github.com/llvm/llvm-project/pull/190708#issuecomment-4839831651
[Offload][NFC] Deduplicate CompressedOffloadBundle into llvm::object
The compressed offload bundle (CCOB) format had two byte-for-byte
identical implementations: one in clang/lib/Driver/OffloadBundler.cpp and
the canonical one in llvm/lib/Object/OffloadBundle.cpp (already used by
llvm-objdump, comgr and others).
Remove the Clang-side copy (class declaration, compress/decompress/
tryParse, the RawCompressedBundleHeader union, getHeaderSize, the
formatWithCommas helper and the private timer group) and route the driver
through llvm::object::CompressedOffloadBundle, which is already linked via
the Object component.
The only API difference is the verbose-reporting channel (bool Verbose vs.
raw_ostream *VerboseStream); the driver now passes &llvm::errs() when
verbose output is requested, preserving the previous behavior.
No functional change intended.
[Dexter] Require lldb-dap for Dexter and log when Dexter is disabled (#206734)
For some time, Dexter tests have been run using lldb-dap when it is
available rather than just lldb/lldb-server. However, the cross project
test dependencies have not been updated since then, meaning that
lldb-dap is not automatically built by check-cross-project. The
Dexter-specific lit config then skips the Dexter tests if lldb-dap is
unavailable, which leads to some check-cross-project builds never
running the Dexter tests. This patch adds lldb-dap to the build
dependencies, and also adds a small log message to inform when the
Dexter tests are skipped; most cases where we skip the Dexter test were
already logged, and this addition expands that to cover all cases.
iflib: Fix unreachable code in watchdog timer
The code seemed to have been predicated on the assumption that
IFLIB_QUEUE_WORKING was actively maintained as a state, but it
seems to be unused.
[PGO][NFC] Avoid floating-point block uniformity check (#206547)
Use an integer threshold when deciding whether a block is mostly
uniform.
This keeps the 90% rule exact and avoids relying on floating-point
arithmetic in profile merging.
lang/swift6: Unbreak stage phase with unprivileged users
Stripping should have been done before COPYTREE_BIN, which drops the
writable bit from the executables and leads to "permission denied"
error.
PR: 296382
Reported by: kib
Tested by: kib
Fixes: 18ac8a4bf341 (lang/swift6: Add port: Powerful, flexible, multiplatform programming language (Version 6))
ctfmerge.1: Import ENVIRONMENT from NetBSD
Import the ENVIRONMENT section from NetBSD, minus the variable that our
ctfmerge does not have. Alphabetize them, polish grammar and alignment,
and add the variables to the man database. While here, remove whitespace
from the end of some lines to quiet linter.
MFC after: 3 days
PR: 291186
Co-authored-by: Alexander Ziaee <ziaee at FreeBSD.org>
Obtained from: NetBSD (christos <christos at NetBSD.org>, 8a0c0d8)
Differential Revision: https://reviews.freebsd.org/D54054