NAS-145298 / 27.0.0 / Merge the two alembic heads that break the middlewared package build (#20245)
The middlewared package fails to build on this branch because the NTS
migration from
[#20210](https://github.com/truenas/middleware/pull/20210) and the mail
certificate validation migration from
[#20218](https://github.com/truenas/middleware/pull/20218) (which the
API key name migration builds on) were added on top of the same parent,
so `alembic upgrade head` stops with "Multiple head revisions are
present". This adds an empty merge migration joining the two heads, so
the package build and upgrades to 27.0.0 resolve to a single head. The
stable/27 and master backports carry this file unchanged, and each needs
its own merge joining that branch's current head to it.
[AMDGPU] Expand constant named barrier matching, poison handling (#191506)
This commit factors out some utilities used to enable M0-less
s.signal.barrier.var on gfx1250 to use them for other intrinsics that
take named barrier objects, such as s.barrier.join, eliminating a bunch
of needless m0 writes when the barrier doesn't change.
In addition, this commit adds tests for other uses of the null barrier
(which are generally no-ops), and adds handling for `ptr addrspace(15)
poison`.
ARM: Expand atomic load/store orderings without barriers in IR
Targets without native atomics or barriers marked i32 ATOMIC_LOAD and
ATOMIC_STORE as Custom so it could change the lowering based on the
ordering. Orderings stronger than monotonic would use the legalizer's
expansion to ATOMIC_CMP_SWAP/ATOMIC_SWAP libcalls.
Make this ordering decision in the IR expansion hooks instead since
those are expressive enough to represent the ordering constraint. This
moves the handling to AtomicExpand instead of the DAG legalizer. This
is kind of a workaround, ideally the same hook would be used by both
paths. This allows setting accurate LibCall actions on
ATOMIC_LOAD/ATOMIC_STORE.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Support] Don't pass a null pointer to memcpy in MD5::update (#236817)
`MD5::update(ArrayRef<uint8_t>)` reaches its final
`memcpy(InternalState.buffer, Ptr, Size)` even when the input is empty.
A default-constructed `ArrayRef` has a null `data()`, so the call passes
a null source pointer with a size of zero. That is undefined behavior,
because `memcpy` declares its arguments nonnull, and UBSan reports it as
"passing null pointer as an argument which is declared to never be
null".
An empty update leaves the hash state unchanged, so return early.
The new test case hashes a default-constructed `ArrayRef`, which traps
under `-fsanitize=undefined` without this change.
assisted with: claude
X86: Use the DataLayout size in the atomic expansion hooks (#243118)
getPrimitiveSizeInBits is 0 for pointers and vectors of pointers, so a
128-bit <2 x ptr> atomic load or store without AVX was not expanded to
cmpxchg16b and was selected as a non-atomic movaps.
Expanding the load to cmpxchg then hit the same problem in
expandAtomicLoadToCmpXchg, which sized the cmpxchg integer type with
getPrimitiveSizeInBits. Use the same integer type and cast chain as the
other atomic integer conversions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang] Compute the macro argument cache in linear time (#243344)
`SourceManager::getMacroArgExpandedLocation()` builds a cache of the
macro argument expansions in a file the first time it's called for that
file. For each macro argument expansion,
`associateFileChunkWithMacroArgExp` followed the argument's spelling
through every macro argument expansion it came from, down to the file.
When arguments go through chains of macros, each chain was walked once
for every expansion in it, which is quadratic in the depth of the chain.
The common `__VA_OPT__` FOR_EACH idiom hits this hard, because its
`EXPAND` macro rescans its arguments 4⁴ = 256 times:
```cpp
#define PARENS ()
#define EXPAND(...) EXPAND4(EXPAND4(EXPAND4(EXPAND4(__VA_ARGS__))))
#define EXPAND4(...) EXPAND3(EXPAND3(EXPAND3(EXPAND3(__VA_ARGS__))))
#define EXPAND3(...) EXPAND2(EXPAND2(EXPAND2(EXPAND2(__VA_ARGS__))))
#define EXPAND2(...) EXPAND1(EXPAND1(EXPAND1(EXPAND1(__VA_ARGS__))))
[18 lines not shown]
www/py-pyweblib: Mark DEPRECATED
- Python 2 only (implicit relative imports)
- Fails to import on Python 3
- No consumers in the tree
- Set EXPIRATION_DATE 2026-12-17
(cherry picked from commit dc6414e778de88215fff0d918c62df689a3a262d)
x11/xautomation: Mark DEPRECATED
- xte cannot move the pointer on current Xorg servers
- Upstream inactive since 2015
- No consumers in the tree
- Use x11/xdotool instead
- Set EXPIRATION_DATE 2026-12-17
(cherry picked from commit 2b774e84d85a48c3c6d16c2ab1f5a402a3178734)
devel/py-pyhashxx: Do not install the top-level tests package
This port installs a file into a generic directory instead of a
private sub-directory of the port:
lib/python3.11/site-packages/tests/__init__.py
This violates the directory hierarchy rules and causes install
conflicts with 16 other ports.
find_packages() picks up the tests directory, which installs a
top-level "tests" package into site-packages, and stage-qa rejects it.
Exclude it.
While here, strip the extension module (stage-qa warned that it is not
stripped), expand pkg-descr from the upstream description, add
concurrent to USE_PYTHON (the package does not change) and document the
patch.
[9 lines not shown]
devel/py-pyhashxx: Do not install the top-level tests package
This port installs a file into a generic directory instead of a
private sub-directory of the port:
lib/python3.11/site-packages/tests/__init__.py
This violates the directory hierarchy rules and causes install
conflicts with 16 other ports.
find_packages() picks up the tests directory, which installs a
top-level "tests" package into site-packages, and stage-qa rejects it.
Exclude it.
While here, strip the extension module (stage-qa warned that it is not
stripped), expand pkg-descr from the upstream description, add
concurrent to USE_PYTHON (the package does not change) and document the
patch.
[7 lines not shown]
[RegAlloc] Reuse failed canReassign searches until a register frees up
canReassign scans the evictee's whole allocation order on every call, so
the eviction loop is quadratic in the order length on register classes
with many registers.
LiveRegMatrix records each unassign as a (register, range) pair in a
bounded history, addressed by absolute position (FreedBase,
getFreedEnd()). An unassign the history cannot describe discards it.
-live-reg-matrix-freed-history sets the limit (default 512).
RegAllocEvictionAdvisor stores each failed search per virtual register,
with a fingerprint of the live range and the history position already
checked. A later query rechecks only the newer freed registers that
overlap the range, and their aliases, and reuses the failure if none is
free. Hint-only searches are not recorded. -regalloc-cache-failed-reassign
(default on) controls recording and reuse.
Remove the AMDGPU override that disabled local reassignment for targets
[7 lines not shown]
[RISCV][P-ext] Replace isPackedZExtShuffleMask with a more general isPackedPairShuffleMask. (#243208)
This avoids the need for commuteMask in isVectorClearMaskLegal.
[lldb] Upstream eSymbolTypeASTFile for Mach-O N_AST stabs (#243567)
The linker emits an N_AST stab for every -add_ast_path. Its name is the
path to a compiler AST file, such as a .swiftmodule. ParseSymtab has no
case for it, so the symbol gets an invalid type.
Add eSymbolTypeASTFile and map N_AST to it. Nothing upstream reads the
new type yet. The Swift fork does, and carries the same enumerator with
the same value.
[mlir][vector] Require in-bounds transfers in mem2reg (#242076)
Mem2Reg no longer promotes vector.transfer_read/vector.transfer_write
ops that have out-of-bounds dimensions. For transfers through dynamic
memref.subviews, lanes past a dynamic subview's extent now have to be
masked off, either by the transfer's mask operand or by an enclosing
vector.mask.
This simplifies the mem2reg promoting memory access of dynamic subview
since the promotion now can use the mask attached to transfer Op to
construct the slot value directly. So this PR removes two interfaces
which transfer_read/write model queries the subview model to construct
the mask for dynamic shape.
This follows review feedback on #234251. Requiring in-bounds transfers
makes passthru vs. padding straightforward: a read wrapped in
vector.mask uses the passthru if one is given, and the padding
otherwise. It also fits the planned removal of in_bounds and padding
from transfer ops (https://github.com/llvm/llvm-project/issues/227821,
[6 lines not shown]
[lldb] Let ProcessWasm order the call frame addresses of Wasm frames
UnwindWasm now counts frames up from the outermost one, in the invalid Wasm
address space, which has no memory, and ProcessWasm::CompareCFAs orders them, so
a synthetic address can neither decrease below zero nor fall inside linear
memory.
[libc][math] Add do not optimize macros and guard some double-double functions. (#243203)
Guard some double-double computations against `-(a * b) -> a * (-b)`
optimizations from compilers.
Return S3 secrets only on create and audit destructive calls
s3.accesskey query and get_instance returned every key's secret to
any holder of SHARING_S3_WRITE. The entry no longer has a secret in
any API version from 27.0.0 on. Create returns it, and so does an
update that rotates it. Nothing else does. The secret is dropped from
the rows before filtering, so a filter or sort on it reveals nothing.
The credentials file gets the secrets through a private call that
reads the datastore.
Audit these API calls, which changed data without leaving a record:
pool.snapshot.rollback, pool.snapshot.delete,
boot.environment.activate, replication.run and
replication.run_onetime.
[flang][cuda] Only transfer component in implicit data transfer (#242061)
When the right-hand side of a host assignment references a CUDA device
component, such as `out = m(1)%d(1) + h` with `d` a device allocatable
component of a managed `m`, genCUDAImplicitDataTransfer collected both
the
component and the object it is taken from. The base has no device
address
to transfer, so lowering hit `dyn_cast on a non-existent value` for
dummy
arguments, and a managed base could be transferred a second time.
The attribute of a component hides the one of its base, which is the
rule
IsCUDADataTransfer already applies. Collect the effective CUDA symbols
so a
component masks its base, and lower the component reference itself:
component symbols have no address, so the designator is lowered, copied
to
[4 lines not shown]