[libc++] Consistently install Python and dependencies across macOS CI jobs (#211659)
On the macOS self-hosted runners, we need to install dependencies via
Homebrew and pinning the Xcode version is good for reproducibility. This
applies the guidelines documented in #211622 to libc++'s CI jobs.
Fix IPA SMB machine account setup and self-heal old joins
Set the SMB machine-account password from the generated value when
retrieving the keytab and write that same value to secrets.tdb as raw
bytes, so the keytab and secrets.tdb agree. Report changesecretpw
stderr on failure and drop the unawaited backup() call.
Regenerate smb.conf before creating the SMB service principal so the
machine account uses the current NetBIOS name, and make principal
creation failures fatal so partial joins roll back.
Stamp a credential version in secrets.tdb; the IPA health check
regenerates the SMB machine account in place, via the host credential,
for systems joined by an earlier build that wrote it wrong. Expose the
same regeneration as an explicit recovery action.
Add unit and integration tests.
(cherry picked from commit c7f2fc95fbcaaad81fdf814e03182fb901a85c96)
Fix IPA SMB machine account setup and self-heal old joins
Set the SMB machine-account password from the generated value when
retrieving the keytab and write that same value to secrets.tdb as raw
bytes, so the keytab and secrets.tdb agree. Report changesecretpw
stderr on failure and drop the unawaited backup() call.
Regenerate smb.conf before creating the SMB service principal so the
machine account uses the current NetBIOS name, and make principal
creation failures fatal so partial joins roll back.
Stamp a credential version in secrets.tdb; the IPA health check
regenerates the SMB machine account in place, via the host credential,
for systems joined by an earlier build that wrote it wrong. Expose the
same regeneration as an explicit recovery action.
Add unit and integration tests.
(cherry picked from commit c7f2fc95fbcaaad81fdf814e03182fb901a85c96)
NAS-141875 / 27.0.0-BETA.1 / Fix IPA SMB machine account setup and self-heal old joins (#19357)
Set the SMB machine-account password from the generated value when
retrieving the keytab and write that same value to secrets.tdb as raw
bytes, so the keytab and secrets.tdb agree. Report changesecretpw stderr
on failure and drop the unawaited backup() call.
Regenerate smb.conf before creating the SMB service principal so the
machine account uses the current NetBIOS name, and make principal
creation failures fatal so partial joins roll back.
Stamp a credential version in secrets.tdb; the IPA health check
regenerates the SMB machine account in place, via the host credential,
for systems joined by an earlier build that wrote it wrong. Expose the
same regeneration as an explicit recovery action.
Add unit and integration tests.
[BOLT] Fix pwrite assertion failure via a new safePWrite wrapper (#198569)
Background: Currently, BOLT seems to implicitly assume that the .dynsym
section is located at a low offset within the binary, calling pwrite()
directly to update it.
Issue: In scenarios where the binary has been modified by tools like
patchelf, sections like .dynsym may be moved to a high offset area. This
can lead to a violation of the Offset + Size <= Pos assertion in
pwrite(). A typical scenario is when the previous eh_frame_header update
moves the stream cursor (pos) back to a low
offset([code](https://github.com/llvm/llvm-project/blob/llvmorg-23-init/bolt/lib/Rewrite/RewriteInstance.cpp#L6387)).
Fix: This patch resolves the pwrite assertion failure via a new
safePWrite wrapper, which introduces a defensive check that verifies and
conditionally adjusts the stream position. A corresponding test case has
also been added.
[VPlan] Fix sentinel assertion when broadcasting invoke results (#210464)
VPTransformState::get broadcasts a scalar value by inserting after the
last scalarized instruction using
std::next(BasicBlock::iterator(LastInst)). When LastInst is a terminator
like invoke, std::next advances past the end of the block, hitting the
!isKnownSentinel() assertion.
Use Instruction::getInsertionPointAfterDef which correctly handles PHIs,
invokes, and regular instructions, matching the pattern already used in
VectorCombine.cpp.
Fixes #210342
AMDGPU: Use ProcessorAlias for legacy arch names
Older targets have aliasing names which were previously implemented
by defining a second copy of the processor, identical except for the name
Use the recently improved tablegen mechanism for defining name-only aliases.
This dedupliates some redundant table entries, like the sched model.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
TableGen: Add first class support for processor aliases
Previously isCPUStringValid was virtual so TableGen could emit an
AArch64 specific hack for recognizing cpu aliases. Teach tablegen
about aliases, and insert each alias into the CPU subtype table as its
own entry (sorted by name, carrying the canonical processor's features
and scheduling model).
There is further opportunity for code sharing improvements. AArch64's
aliases are consumed by ARMTargetDefEmitter to emit a custom inc file
in TargetParser which should be universalized.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[OpenMP] Fix build error after 19857baa71 (#211771)
Some builders using older versions of gcc encounter this issue:
```
llvm/include/llvm/Frontend/OpenMP/OMP.h:138:14: error: ‘Base’ has not been declared
138 | assert(Set.Base::test(At));
| ^~~~
```
E.g. https://lab.llvm.org/buildbot/#/builders/10/builds/32524
[MLIR][Python] Make Python-defined dialect loading context-aware (#210501)
Python-defined dialect loading currently relies on
`Dialect._mlir_module` to infer whether a dialect has already been
loaded. This state belongs to the Python dialect class rather than an
MLIR context.
Consequently, loading the same dialect after switching contexts requires
`reload=True`, while reloading it in a context where it is already
present can hit the operation registration assertion reported in
#210053.
This patch adds `mlirContextGetLoadedDialect` (following
https://github.com/llvm/lighthouse/pull/228#discussion_r3589792891) to
the C API and exposes it as `Context.is_dialect_loaded`.
`Dialect.load()` now queries the active context:
- loading a dialect more than once in the same context raises a
`RuntimeError`;
- loading the same Python-defined dialect in another context succeeds
[8 lines not shown]
groff: remove default-on netpbm dependency
This causes a dependency cycle on macOS via cmake -> ... -> groff ->
netpbm -> libjpeg-turbo -> cmake.
Add it to existing ghostscript option, since both are needed for
full-featured grohtml output now.
Add comments explaining both this and the uchardet option, based on
the configure output.
Bump PKGREVISION.
[LV] Simplify VPCostContext ctor by using VFSelectionContext (NFC). (#211765)
VFSelectionContext provides most fields needed. Pass it directly and
access its fields.
cuse: Fix server reference leak in cuse_client_open()
If the server is closing (or the device node is going away), or if
devfs_set_cdevpriv() fails, cuse_client_open() returns with the server
reference taken at the top of the function still held and the newly
allocated client still linked on pcs->hcli. Since cuse_client_free()
has not been registered as the cdevpriv destructor at that point,
nothing ever undoes this work: every open() that races the is_closing
window permanently leaks one server reference and one cuse_client.
A leaked reference is fatal on server exit: cuse_server_free()
busy-waits in an uninterruptible pause("W", hz) loop until pcs->refs
drops to 1, which now never happens, so the exiting server process
(e.g. virtual_oss(8)) is left wedged in state "D", immune to SIGKILL,
cuse.ko is pinned (kldunload hangs too), and only a reboot recovers.
Before 634e578ac7b0 the is_closing error path dropped the reference by
calling devfs_clear_cdevpriv(), which ran the cuse_client_free()
destructor. That commit moved devfs_set_cdevpriv() after the
[14 lines not shown]
snd_uaudio: Don't let an idle stream reprogram a shared UAC2 clock
Some UAC2 devices expose a single Clock Source entity that is shared
between their playback and capture interfaces (it appears in both the
output and input clock bitmaps). On such a device uaudio(4) programs
the sample rate for both directions when a stream starts. If playback
runs at a 44.1 kHz-family rate while the idle capture channel is left
at its 48 kHz-family default, the capture
SET_CUR(UA20_CS_SAM_FREQ_CONTROL) is issued after the playback one and
overwrites the rate on the shared clock. The device then runs at
~48 kHz while the playback stream carries 44.1 kHz data. Consuming
samples faster than they arrive, the device repeatedly runs out of
data, loses sync with the playback stream, and re-locks onto it
(audible dropouts, front-panel play/idle flicker). The 48 kHz family
is unaffected because both directions then agree on the rate.
Fix it in three parts:
- Add a shared-clock guard: before issuing SET_CUR to a clock id, if
[28 lines not shown]
[ExpandMemCmp] Check misaligned access per overlapping/tail load (#210707)
Overlapping loads place a power-of-two load at an offset that need not be
a multiple of its size, so the access can be misaligned even when the base
pointers are aligned. Rather than have each target gate
`AllowOverlappingLoads` on unaligned support, give `MemCmpExpansion`
the target info and check the overlapping load against its actual alignment
`(commonAlignment(baseAlign, offset))` via
`TargetTransformInfo::allowsMisalignedMemoryAccesses`. It is only formed when
the target can access it; otherwise the expansion falls back to the greedy
(naturally aligned) sequence.
Tail expansions are different: they merge already-legal adjacent loads
covering the same bytes, and the backend always legalizes the merged
(possibly non-power-of-two) load into aligned power-of-two pieces, so
they need no alignment gate. The one real constraint is size: a merged load
wider than `MaxLoadSize` can only be emitted when it is the sole load
(`getMemCmpOneBlock`). In a multi-block expansion, `emitLoadCompareBlock`
and the result-block phis are sized to `MaxLoadSize` and assume every
[6 lines not shown]
[AArch64] Add Apple SME compute clustering macro-fusion (#211483)
This patch adds a subtarget feature that controls scheduling SME compute
instructions back to back. Enabled on Apple CPU.
[X86] Match (FM)ADDSUB patterns from target shuffles as well as ISD::VECTOR_SHUFFLE (#211764)
Allows us to match X86ISD::ADDSUB/FMSUBADD/FMADDSUB after shuffle lowering
Reland [OMPIRBuilder] Don't use invalid debug loc in reduction fn. (#211566)
This fixes https://github.com/llvm/llvm-project/issues/211385. This was
initially landed in https://github.com/llvm/llvm-project/pull/148284.
We have this pattern of code in OMPIRBuilder for many functions that are
used in reduction operations.
```
Function *LtGRFunc = Function::Create
BasicBlock *EntryBlock = BasicBlock::Create(Ctx, "entry", LtGRFunc);
Builder.SetInsertPoint(EntryBlock);
```
The insertion point is moved to the new function but the debug location
is not updated. This means that reduction function will use the debug
location that points to another function. This problem gets hidden
because these functions gets inlined but the potential for failure
exists.
[8 lines not shown]
[flang][OpenMP] Switch TableGen generation to use llvm::EnumSet (#211327)
Replace the remaining uses of the common::EnumSet-based OmpClauseSet to
llvm::omp::ClauseSet.