Active Directory: fix rejoin, harden reset/recover, improve diagnostics
SAF cache stores {host, ip} dict (host captured via a fresh CLDAP ping to
the chosen kdc_server IP, so the pair authoritatively identifies one DC).
_saf_kdc_name uses the cached host directly, avoiding RDNS in samba's
--server flag and the krb5.conf kdc= override. activate_standby accepts
both the legacy single-string IP and the new dict form for HA mixed-version
upgrades.
_health_check_ad runs _test_machine_account_password only as a refinement
of a failing WBClient.ping_dc(). No krb5.conf churn on healthy systems;
AD_SECRET_INVALID fires only when ping_dc has already failed AND the
password test confirms a credential mismatch (PREAUTH_FAILED). The temp
krb5.conf the test writes now mirrors the system config (rdns=false,
dns_canonicalize_hostname=false, NAS-138687) and is restored via a finally
block so KRB5Error doesn't leave the system config polluted.
_recover_secrets typo fix: KRB5_PREAUTH_FAILED -> KRB5KDC_ERR_PREAUTH_FAILED.
The wrong constant meant the credential-mismatch arm was previously
[18 lines not shown]
[clang] Add typed variants for C2y stdbit.h rotate builtins (#195299)
stdc_rotate_left_{uc,us,ui,ul,ull}
stdc_rotate_right_{uc,us,ui,ul,ull}
Lower type-specific <stdbit.h> rotate functions to LLVM intrinsics
(fshl/fshr). Includes constant expression support and tests for Sema,
CodeGen, and constant evaluation.
Followup: #160259
[PAC][lld] Do not emit AUTH relocs against undef weak non-preemptible symbols
Undefined weak non-preemptible symbols should be statically resolved to
the addend value and not signed. Previously, a dynamic relocation
against such symbols was emitted, which is not a correct behavior.
See also docs: https://github.com/ARM-software/abi-aa/pull/391
Resolves #173296
Fix assertion failure of `APInt::sqrt` on U64 MAX input (#197161)
Closes #197145
In https://github.com/llvm/llvm-project/blob/65a206f2ec552cccf7c96c5306147f0437832ec7/llvm/lib/Support/APInt.cpp#L1305-L1312:
Instead of computing `nextSquare` completely (which overflows), we only
need to compute the difference between `x_old^2` and `(x_old + 1)^2`
which is simply `2 * x_old + 1` since `(x_old + 1)^2 = x_old^2 + 2 *
x_old + 1`. We can use this difference for the following computation of
the midpoint.
[ScheduleDAG] Add a reachability cache to amortize DFS calls (#195079)
ScheduleDAGTopologicalSort::IsReachable falls out to a DFS on its
slow path. For some connectivity patterns this can result in ~quadratic
behavior.
Add a cache of {A, B} -> Reachable(A, B). This is invalidated whenever
AddPred or InitDAGTopologicalSorting is called.
For an antagnostic testcase, SelectionDAG time went from 1300s to 250s.
No testcase as no functional change, performance only.
---------
Co-authored-by: James Molloy <jmolloy at google.com>
AMDGPU/GlobalISel: Switch to extended LLTs
Switch is required to be able to translate bfloat.
After the switch most of the codegen patterns now require explicit
type on register to match instead of LLT::scalar.
So we can still use LLT::scalar for type checks but new instructions
created during lowerings/combines need to use propper extended LLT.
inst select test sources fully switched to i32/f32 so patterns can match
for legalizer and regbanklegalize left as is (should probably be switched
as well)
New functionality worth noting is f16 and bitcast lowering to i32
f16 = g_bitcast i16
->
i32 = g_anyext i16
f16 = g_trunc i32
f16 = trunc i32 is legal
[BasicAA] Don't look through llvm.ptrmask in GEP decomposition (#197082)
DecomposeGEPExpression() looked through llvm.ptrmask via
getArgumentAliasingToReturnedPointer(Call, MustPreserveNullness=false).
ptrmask preserves the underlying object but can change the byte address
by clearing low bits, so treating its result as having the same symbolic
offset as its argument produces stale offsets and bogus NoAlias answers.
The bug was introduced by 3f2850bc606c847075673554fe49d4a35f525b61.
Rename MustPreserveNullness to MustPreserveOffset, the property
DecomposeGEPExpression actually needs. Offset preservation is strictly
stronger than nullness preservation, so existing callers remain correct
and the accepted intrinsic set is unchanged (ptrmask stays excluded).
switch DecomposeGEPExpression to pass MustPreserveOffset=true. Every
call site is now tagged with MustPreserveOffset=.
Add a guarded .note.GNU-stack section to crypto assembly files.
Add a .note.GNU-stack section to avoid ending up with an executable stack
on toolchains that believe we should have an executable stack by default.
Reported by ruuda on Github.
Discussed with tb@
[DAG] visitBITCAST - fold (conv (scalar_to_vector(load x))) -> (load (conv*)x) (#196978)
Legalization can leave superfluous scalar_to_vector nodes with the
scalar bitwidth matching the vector bitwidth - peek through these when
attempting to bitcast folds
Only one match in trunk at the moment, but there are some additional
folds encountered in #149798
[LLDB] Simplify the API of ClangUserExpression::ScanContext [NFC] (#197037)
- this function is a virtual function, but it is called by the leaf
class ClangUserExpression
- it also returns a Status only to then report any error as a warning
This patch devirtualizes the function, since there is use-case for
overloading it in other expression evaluator plugins, and it cleans up
the Status usage by passing in DiagnosticManager directly, like its
sibling functions do.