[FileCheck] Resurrect overflow tests (#198136)
D150880 (landed as 0726cb004718) uses `APInt` to eliminate most integer
overflow issues from FileCheck numeric variables. It also removes the 4
tests in `llvm/test/FileCheck/match-time-error-propagation`.
While the elimination of overflow issues reduces the importance of those
tests, the tests still seem worthwhile. Without them, I see no test that
exercises the "unable to substitute variable or numeric expression:
overflow error" diagnostic in FileCheck input dumps.
This patch resurrects those tests and updates them to exercise the
remaining unsigned underflow case.
[NFC][DebugInfo] Add Annotations parameter to DIBuilder::createStructType (#197331)
DICompositeType already has an "Annotations" ivar. This simply adds a
way to set it from the "createStructType" function.
[DWARFVerifier] Skip DW_TAG_LLVM_annotation in DWARFVerifier (#198867)
Annotations are not indexed, so we need to skip them on the verifier.
Assisted by: claude
[VectorCombine] foldShuffleChainsToReduce - fold at equal costs (#199242)
Similar to other VectorCombine folds, in case of OldCost == NewCost, use
the reduction if at least the root BinOp is removed as well as the
ExtractElement.
Noticed while triaging codegen for #199208
math/R-cran-lazyeval: Update to 0.2.3
The previous version (0.2.2) failed to build against math/R 4.6.0.
PRENV, PREXPR, and Rf_findVar are non-API entry points whose
declarations are no longer available in R 4.6.0's installed headers.
Version 0.2.3 rewrites the C implementation on top of the rlang C
library to comply with R's public C API.
Release notes: https://github.com/hadley/lazyeval/releases/tag/v0.2.3
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56904
[LLDB] Refactor SDK-related functions in Platform (#199141)
There are a lot of similar and repetetive variants of SDK lookups in the
Apple platform plugins. This commit unifies the implementations, error
handling and progress reporting.
Assisted-by: claude
[clang-doc][nfc] Silence tidy warning about anonymous namespace
clang-tidy complains that we should prefer static over the anonymous
namespace, despite the API being static in addition to being in the
anonymous namespace. We can silence the diagnostic by simply removing
the namespace declaration.
[flang-rt] Remove fallback if RPC headers not found (#199211)
Summary:
These are stored in the libc/shared and have a unified CMake helper to
find them. Likely these will be a more core dependency as LLVM uses them
for constexpr math, libcxx uses it, and compiler-rt will probably use
bits of it.
The original intention was to allow building flang-rt with a partial
checkout, but i don't think this is a reasonable use-case and I do not
think this exists in practice.
mboxgrep: fix build with llvm22
gzFile is a pointer type, so it should be used, not gzFile *. It is also
not equivalent to FILE *, so undo some incorrect fixes from prior compiler
updates.
Release parked async LUN-replace cleanup after DLM peer eviction
scst.async_lun_replace=1 now also tells the kernel to park the deferred
cleanup of old tgt_devs from each LUN replace until the flag is cleared.
This avoids stalling become_active on scst_dlm_lock_wait inside
scst_clear_reservation while the dead peer is still a DLM lockspace
member.
Add iscsi.scst.disable_async_lun_replace and call it from the end of
iscsi.alua.reset_active, after dlm.reset_active (which evicts the peer)
completes.
(cherry picked from commit b89dec23e5eb9f9ddfe3efb8b6849833fbed7deb)
iSCSI ALUA: regression test for failover LUN-replace stall
Add an extended test that builds 2 targets (25 + 10 LUNs), opens an
iSCSI session to the standby on the 25-LUN target so the kernel has
tgt_devs to clean up during become_active, then triggers an ungraceful
failover via poweroff_vm. Asserts:
- /var/log/failover.log on the new master does not contain
'Failed to restart service "iscsitarget" after 15 seconds',
which would indicate the LUN-replace loop stalled.
- /sys/kernel/scst_tgt/async_lun_replace reads 0 after failover,
confirming reset_active released the parked cleanup work.
- All LUNs are reachable on the new master.
A function-scoped fixture handles recovery (start_vm, wait_for_backup,
wait_for_settle) so the cluster is restored to a clean two-node state
even if an assertion above failed.
Uses the dataset() asset helper rather than zvol() for lower
[3 lines not shown]
Release parked async LUN-replace cleanup after DLM peer eviction
scst.async_lun_replace=1 now also tells the kernel to park the deferred
cleanup of old tgt_devs from each LUN replace until the flag is cleared.
This avoids stalling become_active on scst_dlm_lock_wait inside
scst_clear_reservation while the dead peer is still a DLM lockspace
member.
Add iscsi.scst.disable_async_lun_replace and call it from the end of
iscsi.alua.reset_active, after dlm.reset_active (which evicts the peer)
completes.
(cherry picked from commit b89dec23e5eb9f9ddfe3efb8b6849833fbed7deb)
iSCSI ALUA: regression test for failover LUN-replace stall
Add an extended test that builds 2 targets (25 + 10 LUNs), opens an
iSCSI session to the standby on the 25-LUN target so the kernel has
tgt_devs to clean up during become_active, then triggers an ungraceful
failover via poweroff_vm. Asserts:
- /var/log/failover.log on the new master does not contain
'Failed to restart service "iscsitarget" after 15 seconds',
which would indicate the LUN-replace loop stalled.
- /sys/kernel/scst_tgt/async_lun_replace reads 0 after failover,
confirming reset_active released the parked cleanup work.
- All LUNs are reachable on the new master.
A function-scoped fixture handles recovery (start_vm, wait_for_backup,
wait_for_settle) so the cluster is restored to a clean two-node state
even if an assertion above failed.
Uses the dataset() asset helper rather than zvol() for lower
[3 lines not shown]
Release parked async LUN-replace cleanup after DLM peer eviction
scst.async_lun_replace=1 now also tells the kernel to park the deferred
cleanup of old tgt_devs from each LUN replace until the flag is cleared.
This avoids stalling become_active on scst_dlm_lock_wait inside
scst_clear_reservation while the dead peer is still a DLM lockspace
member.
Add iscsi.scst.disable_async_lun_replace and call it from the end of
iscsi.alua.reset_active, after dlm.reset_active (which evicts the peer)
completes.
(cherry picked from commit b89dec23e5eb9f9ddfe3efb8b6849833fbed7deb)
[LLVM] Handle zero first-arg-index in modular-format (#199118)
Relax modular-format attribute validation in the Verifier to allow a
first-arg-index of 0 (meaning no variadic arguments, e.g. for v-family
functions like vsnprintf).
Guard InstCombine's optimizeModularFormat against zero index.
Generated by Gemini, reviewed by dthorn
NAS-140948 / 27.0.0-BETA.1 / Avoid LUN-replace stall and slow HA-session cleanup at failover (#18920)
Avoid LUN-replace stall and slow HA-session cleanup at failover
Three small middleware changes that together address a failover
LUN-replace stall and the long cleanup path it sits behind:
* iscsi.scst: add disable_async_lun_replace, the matching companion to
enable_async_lun_replace. Writing 0 to async_lun_replace tells the
kernel to release the parked LUN-replace cleanup that was deferred while
the flag was set. This requires a corresponding SCST PR.
* iscsi.alua.reset_active: call disable_async_lun_replace from a finally
block, after dlm.reset_active. The peer is already evicted from the DLM
lockspaces by then (eject_peer is its first step), so releasing the
parked work is safe.
* iscsi.target.login_ha_targets: lower the per-session
replacement_timeout on freshly-logged-in HA sessions from the 120s
[3 lines not shown]
[SLP] Add test for fmuladd bit width propogation (#199128)
Not profitable with VF=4, but we only we try smaller VFs if the load can
fit in a single vector register found by BoUpSLP::getVectorElementSize().
Requires proprogation of bit widths through the fmuladd intrinsic to vectorize
at VF=2. This is from the hot block in `538.imagick_r` which fails to vectorize
when vectorization is removed from pre-LTO, see
https://github.com/llvm/llvm-project/pull/195886#issuecomment-4486422243.
tftpd: Simplify packet drop macro
The first argument is always the function name, for which we can simply
use __func__. This leaves only the optional return value, so we can use
a single variadic macro instead of two nearly-identical copies.
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D57076
tftpd: Add missing bounds checks
In send_[rw]rq(), we were using strlcpy() to avoid overflowing our
packet buffer, then failing to check the result and blithely advancing
our pointer by the full length.
Luckily, this code is only ever used by tftp(1), not tftpd(8).
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D57075
tftp: Add test case with over-long URL
This adds a test case that passes a very long URL on the command line,
which would previously have resulted in a benign buffer overflow in
urihandling(), detectable only by compiling tftp with ASAN enabled.
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D57074