[LLVMABI] Fix build for GCC < 8 (#190974)
`llvm::abi::ArgInfo::get*` functions return `llvm::abi::ArgInfo` by
value, so we need the type to be copyable. It is not though, because of
the non trivially copyable member `MaybeAlign` (`std::optional<Align>`)
in a union, which deletes the implicit copy/move constructors and
assignment operators.
For modern GCC versions and for clang this does not present as a problem
due to named return value optimization (NRVO). It is however not a bug
in old GCC versions, because NRVO is not guaranteed. Similary
`std::optional`
could be trivially copyable, but that is also not guaranteed by the
standard.
Instead of depending on these details of the C++ implementation, move
the `MaybeAlign` member out of the union, and make it a separate member
of `abi::ArgInfo`. We lose the expressiveness from the type system that
`IndirectAttrInfo` always has a defined alignment, but we can get that
back in practice by placing asserts in the code that uses it. Therefore
[2 lines not shown]
installer: Add download.freebsd.org to mirror list
download.freebsd.org is backed by project mirrors and a CDN, which
should benefit most users.
Sponsored by: The FreeBSD Foundation
Reviewed by: delphij (releng)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54849
sysutils/screen-devel: Update distfile
When unpacking the tarballs there is no material difference between the
old and the new files. Additionally, there is no difference when
comparing the two tarballs after unzipping the .gz files. One must
conclude the files are compressed differently as the new .gz file is 4K
smaller then the previous file.
(cherry picked from commit 7fd033436f0ef341f70e8592fa741d5b92b27fd9)
x11/cde*: Work around bus errors and looping CDE apps
-O2 optimization is too aggressive for CDE. Scaling it back to -O
eliminates bus errors on some systems and dtcalc looping with the
error, *** M .LE. T IN CALL TO MPCHK.
Reported by: Jeremy Doolin <jrdoolin at pm.me>
(cherry picked from commit fa43a93555ef08544bc2139af3411e00797c70dd)
sysutils/screen-devel: Update distfile
When unpacking the tarballs there is no material difference between the
old and the new files. Additionally, there is no difference when
comparing the two tarballs after unzipping the .gz files. One must
conclude the files are compressed differently as the new .gz file is 4K
smaller then the previous file.
MFH: 2026Q2
[LSAN] Add extra suppressions on Apple Aarch64 (#117478)
- _fetchInitializingClassList for startup code in dyld.
- dyld4::RuntimeState::_instantiateTLVs for thread locals.
Fixes https://github.com/llvm/llvm-project/issues/115992, now it shows
the following instead (in a project using thread locals):
```
-----------------------------------------------------
Suppressions used:
count bytes template
3 120 *_fetchInitializingClassList*
1 104 *dyld4::RuntimeState::_instantiateTLVs*
-----------------------------------------------------
```
[AArch64][CodeGen] match (or x (not y)) to generate mov+orn (#190769)
Fixes: https://github.com/llvm/llvm-project/issues/100045
Adds AddedComplexity to increase the priority the pattern that matches
(or x (not y)) and generates a mov+orn instead of the original mvn+orr.
The number of instructions still stay the same but mov+orn can be
considered better than mvn+orr for two reasons:
1. Symmetry: For the same input with an 'and' instead of 'or', mov+bic
is generated.
2. Optimzation through register rename: If mov is immediate (for
example, 'mov x1, #0x4'), it can be retired early by the register
renamer and never issued for execution.
[compiler-rt] fix __sanitizer::struct_sock_fprog_sz availability (#183411)
`struct sock_fprog` is not provided by glibc, but rather by the linux
headers (`#include <linux/filter.h`). It seems that glibc due to an
implementation detail internally includes `<linux/filter.h>` somewhere
other C libs (e.g. musl) do not, which previously caused build failures
and let to disabling `struct sock_fprog` on non-glibc Linux systems.
This adds the missing include and provides it again for all Linux
systems regardless of C lib.
[RISCV][NFC] Improve Musttail Comments/Tests (#191093)
In the Target code, this is mostly fixing typos or other comment issues.
In the musttail.ll test, this ensures the tests are more aligned with
their comments, and that the comments are accurate. I inserted some
inline asm clobbers so it's also easier to see what's going on.
[clang][ssaf] Add `JSONFormat` support for `WPASuite` (#191082)
This patch adds `JSONFormat` serialization support for `WPASuite`.
- Adds `readWPASuite` / `writeWPASuite` to the `SerializationFormat`
abstract interface and implements them in `JSONFormat`.
- Introduces `AnalysisResultRegistryGenerator`, a per-format plugin
registry template in `SerializationFormat`, allowing analysis authors to
register (de)serializers for their `AnalysisResult` subtypes with a
single static declaration.
- Extends `PrivateFieldNames.def` with `WPASuite::Data` and
`WPASuite::IdTable`, and adds a `makeWPASuite()` factory to
`SerializationFormat`, so deserialization code can construct a
`WPASuite` incrementally through the same access-controlled pattern used
for all other SSAF data structures.
[TargetLowering] Add support for more constants to expandDIVREMByConstant. (#189286)
If we can find a chunk size k where 2^k mod divisor == -1, we can add
the even chunks and subtract the odd chunks. The resulting sum may be
negative, so we need to add 2^k + 1 (a multiple of divisor) for each odd
chunk to ensure the result is positive. We have enough extra bits
between the chunk size and HBitWidth to avoid overflow.
The idea here is similar to checking if a decimal number is divisible by
11. You can add the even digits and subtract the odd digits. If the
resulting sum is divisible by 11 the original number is divisible by 11.
<sys/extattr.h>: use designated initializers for EXTATTR_NAMESPACE_NAMES
This is not a functional change, but it makes it more clear upon
inspection of the definition that the mapping property described is
preserved. Maybe more importantly, if one ends up getting an index
wrong or punching a hole in the name array unexpectedly, then it'll
hopefully manifest more clearly as a (null) or nullptr deref rather than
potentially just emitting the wrong namespace name.
It's noted that this almost certainly invalidates its use in C++, but
there aren't really any known C++ consumers of it- let's just cross
that bridge if we get there.
Reviewed by: kib, mckusick, rmacklem
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55323
find: add -xattr and -xttrname
We use -xattr in our openrsync tests for convenience, and it seems like
a good addition to FreeBSD. -xattr and -xattrname will both consult all
available namespaces by default, but -xattrname allows filtering by
namespace using a "user:" or "system:" prefix.
Inspired by: https://github.com/apple-oss-distributions/shell_cmds
Reviewed by: kib, rmacklem
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55286
libc: fix memfd_create's HUGETLB handling
The 'simplification' commit referenced below actually broke one aspect
of MFD_HUGETLB: the caller isn't supposed to be required to specify a
size. MFD_HUGETLB by itself without a shift mask just requests a large
page, so we revert that part of memfd_create() back.
While we're here, fix up the related parts of the manpages a little bit,
since MFD_HUGETLB is actually supported. The manpage claims that we
would return ENOSYS if forced mappings weren't supported, but this was
actually not true. However, that seems like a very important
distinction to make between ENOSYS and EOPNOTSUPP, so fix the
implementation to match the docs.
Fixes: 8b8cf4ece660f ("memfd_create: simplify HUGETLB support [...]")
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D56114
tests: kqueue: add a basic test for CPONFORK
Just copy over a timer and a write-filter, be sure that we can observe
both in the child. Maybe the timer should check for a minimum time
passed, but I don't know that we'd be likely to get that wrong.
This also adds a negative test with a kqueue that is *not* set for
CPONFORK being added to the first one, made readable, and confirming
that we don't see a knote for it in the child.
Some other improvements to the test noted in the review are planned in
the short term, but they're not particularly worth blocking adding this
as a basic sanity check.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D56223
kqueue: slightly clarify the flow in knlist_cleardel()
This is purely a cosmetic change to make it a little easier on the eyes,
rather than jumping back to the else branch up top. Re-flow it to use
another loop on the outside and just inline the re-lock before we repeat
after awaking from fluxwait.
The !killkn path should maybe issue a wakeup if there's a thread in
KQ_SLEEP so that userland can observe the EOF, but this isn't a
practical problem today: pretty much every case of knlist_clear is tied
to a file descriptor and called in the close(2) path. As a consequence,
potentially affected knotes are almost always destroyed before we even
get to knlist_clear().
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D56226
kqueue: don't leak file refs on failure to knote_attach()
We'll subsequently just knote_free() since the knote is barely
constructed, but that bypasses any logic that might release references
on owned files/fops. Defer clearing those until the knote actually owns
them and update the comment to draw the line more clearly.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D56318
[RISCV] Remove NoVendorXMIPSCBOP from the Zicbop instructions. (#191015)
The XMIPSCBOP encodings use OP-CUSTOM-0 so there's no encoding overlap
here. Presence of a vendor extension should not disable parsing or
disassembly of a standard extension that doesn't overlap.
[Clang][NFC] tests showcasing incorrect use of HIP and OpenCL memory scope macros (#188890)
The tests demonstrate how incorrect LLVM IR is generated without
diagnostics, when an OpenCL or HIP scope number is passed to an AMDGPU
intrinsic. #185408 lays the groundwork for properly diagnosing this
situation by internally using a separate enum type to represent each set
of scope numbers.
crypto/openssl: add new manpage from release 3.5.6
MFC after: 1 day (the security issues warrant a quick backport).
MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8
crypto/openssl: update artifacts to match 3.5.6 release artifacts
A new manpage and any associated links will be added in the next commit.
MFC after: 1 day (the security issues warrant a quick backport).
MFC with: 10a428653ee7216475f1ddce3fb4cbf1200319f8
MFV: crypto/openssl: update to 3.5.6
This change brings in version 3.5.6 of OpenSSL, which features
several security fixes (the highest of which is a MEDIUM severity
issue), as well as some miscellaneous feature updates.
Please see the release notes [1] for more details.
PS Apologies for the confusing merge commits -- I was testing out a
new automated update process and failed to catch the commit message
issues until after I pushed the change.
1. https://github.com/openssl/openssl/blob/openssl-3.5.6/NEWS.md
MFC after: 1 day (the security issues warrant a quick backport).
Merge commit 'ab5fc4ac933ff67bc800e774dffce15e2a541e90'