camcontrol: Fix -Wcast-align errors in the NVMe reservation report
Casting the byte buffer that holds the Reservation Report payload to
the status structures trips -Wcast-align on strict-alignment
architectures, which broke the CI builds there. Put the buffer in a
union with the two status structures instead, so it is properly
aligned and no casts are needed.
Reported by: FreeBSD CI
Fixes: ba75cf05727e ("camcontrol: Support NVMe reservations via the persist subcommand")
Co-authored-by: Claude Fable 5 <noreply at anthropic.com>
MFC after: 1 week
Sponsored by: Spectra Logic
[Option] Add and use LLVM_REGISTER_LIBRARY_OPTIONS. NFC (#239887)
Extract from #239678: Exempt the file-scope registration of options
struct from -Wglobal-constructors, in preparation for enabling
-Werror=global-constructors for llvm/lib.
[CGP] Fix incorrect sized ConstantInt crash
Fixes a buildbot failure after #226197, https://lab.llvm.org/buildbot/#/builders/210/builds/13772.
We were always using a 64-bit APInt for StructSize which causes a type mismatch and crash for 32-bit targets with scalable vectors, e.g. riscv32 with +v
[perf-training][merge-fdata] Clean up input fdata files (#139650)
BOLT AArch64 worker has been running out of disk space due to excessive
fdata files being produced from clang-bolt builder. Delete merged fdata
files to counter disk space waste.
[Clang][C++2d] Implement defaulted postfix increment and decrement operators (P3668R4) (#229560)
Paper:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3668r4.html
Allow the postfix `operator++(int)` and `operator--(int)` to be
explicitly defaulted, as specified by P3668R4 ([over.inc.default]). The
implicit definition of a defaulted postfix operator for a type `C` is
equivalent to
```cpp
C tmp(c);
++c; // or --c
return tmp;
```
where c denotes `*this` for an implicit object member function and the
first parameter otherwise. The copy is direct-initialized and `tmp` is a
candidate for named return value optimization.
[32 lines not shown]
[compiler-rt][test] Use sysroot dynamic linker and rpath on Linux (#239878)
Follow-up to https://github.com/llvm/llvm-project/pull/239742.
`glibc-X.Y` lit features are detected from `CMAKE_SYSROOT` headers, but
test binaries still executed against the host's glibc at runtime,
breaking
tests like `preinit_array.cpp` (`UNSUPPORTED: glibc-2.34`) and
`getline_nohang.cpp` (`UNSUPPORTED: glibc-2.38`) when the host glibc is
newer than the sysroot.
Assisted-by: Gemini
CodeGen: Remove clearKillFlags calls on virtual registers (#239778)
Kill flags are no longer permitted on virtual registers, so clearing
them is a no-op. Remove the calls in generic passes where the register
can only be virtual.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
zio_reexecute() keeps the old allocation trace
An allocating write that fails with anything but ENOSPC is reexecuted,
and keeps being reexecuted for as long as its vdev fails writes but
passes probes. With metaslab tracing enabled, each attempt adds its
allocation trace entries to the same io_alloc_list, which is only
reset when the zio is created. After a few thousand entries a debug
build panics with "too many entries in allocation list"; a non-debug
build keeps a list full of stale entries.
zio_reexecute() now starts a fresh trace list.
Reviewed by: George Wilson <gwilson at zfsmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19634
[clang][NFC] Clean up conditional statement and make pointer type explicit (#239279)
Remove redundant `else if` and replace with `if` in conditional logic.
The first `if` condition will cause an early return and making the next
condition an `else if` is not beneficial here.
Define `Delim` as a `const auto*` pointer to make the variable type
explicit.
Signed-off-by: Hardik Kumar <hardikxk at gmail.com>
msun: fix behaviour of nextafter*() and nexttoward*() for MAX value
For an edge case at an extreme, e.g., nextafter(-DBL_MAX,-INFINITY)
do not return x+x. Instead, evaluate x+x and assign it to a volatile
to raise an exception, and then fall through to return the correct
result in current rounding mode.
Approved by: re (cperciva)
PR: 299389
MFC after: 6 days (for inclusion into releng/15.2)
(cherry picked from commit 1fb5d8265bc4bbbf1f5bc79cc1d2a7f280b446b2)
(cherry picked from commit 42f926513b74cbac09d4d63a9daf8cb489078671)
contrib/bc: remove vs sub-directory
Some of the files in the vs sub-directory are checked out with CRLF
line breaks via .getattributes. This causes issues when checking out
the source tree with other tools that operate on Git repositories like
"got". Remove the vs sub-directory from the contrib tree, since it is
not required on FreeBSD.
Approved by: re (cperciva)
(cherry picked from commit 94d4ba04a96f495d635bf246e4d5021eb1faab22)
(cherry picked from commit 5b5f93f12e3683b3ba7d2d600384bb5c4ed6e91a)
[RegAllocFast] Drop kill flags on virtual registers from the fold tests
The machine verifier now rejects them (#239012). The fast register
allocator works out where each value dies on its own, so the output is the
same without them. That makes tied_input_dies_no_kill_flag a copy of
tied_input_dies, so remove it.
Assisted-by: Claude Opus 5.5
[lldb] Honor the arm64 subtype when launching on Darwin (#239423)
LaunchProcessPosixSpawn treated a CPU subtype of 0 as unset and fell
back to posix_spawnattr_setbinpref_np, which only takes a CPU type.
CPU_SUBTYPE_ARM64_ALL is 0, so launching the arm64 slice of a
universal arm64/arm64e binary ran the arm64e slice while LLDB
reported arm64. debugserver had the same check.
With the check gone, the kernel requires an exact subtype match. Map
arm64_32 to CPU_SUBTYPE_ARM64_32_V8 in debugserver instead of 0.
rdar://191339428
Assisted-by: Claude
[lldb] Forward real registers in TestScriptedFrameProvider's frame without variables (#239875)
`test_expression_at_frame_without_variables` failed on aarch64 Linux
with "Couldn't allocate space for materialized struct". Its scripted
frame had no register context, so LLDB couldn't allocate memory in the
inferior to run the expression from that frame. On macOS, debugserver
allocates memory without going through the frame, which is why the test
passed there.
This patch makes the frame forward the registers of the real frame it
replaces, so evaluating an expression there works like at a regular
frame. It still keeps the default `get_variables()`, which the test is
about.
Assisted-by: Claude
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>