fusefs: fix a race in the pre-init tests
These tests allow the user to customize the INIT response. But it's
necessary to block the daemon's service loop from running until those
expectations have been set. This race has never caused failures before
simply due to luck. But now it's failing on slower platforms.
PR: 296236
Reported by: siva
MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: siva
Differential Revision: https://reviews.freebsd.org/D57781
[Instrumentor] Add comparison instrumentation opportunity (#204069)
This patch adds an instrumentation opportunity for comparison
instructions (`icmp` and `fcmp`).
[lldb][test] Fix TestHiddenIvars rebuild failures in hidden-ivars Makefile (#205114)
Two rebuild-state bugs surfaced when running `./bin/lldb-dotest -p
TestHiddenIvars.py`:
```
FAILED (errors=6, skipped=7, expected failures=2)
```
1. `mkdir: stripped: File exists`, mkdir failed on the second build
because the directory already existed. Switch to `mkdir -p`.
2. `cp -r a.out.dSYM stripped/a.out.dSYM` recurses *into* the existing
destination on rebuild, producing a nested `stripped/a.out.dSYM/
a.out.dSYM/`. The outer dSYM keeps its stale UUID, so lldb cannot
match it to the freshly relinked stripped binary (which gets a new
UUID per link via -Wl,-random_uuid), causing source breakpoints to
fail to resolve. Remove the destination before copying.
[RISCV] Remove isCodeGenOnly=0 from PseudoLA_TLSDESC. (#205366)
The default for a Pseudo is isCodeGenOnly=1. With isCodeGenOnly=0 the
'la.tlsdesc' is a valid mnemonic for the assembly parser, but crashes in
the encoder.
I don't think this was meant to be a valid assembly mnemonic so remove
it.
[CIR] Handle non-zero-initializable types in emitNullInitialization (#201654)
Value-initializing an aggregate containing a pointer-to-data-member
(e.g. `new Inner()` where `Inner` has an `int Inner::*` field) crashed
with "type is not zero initializable" because `emitNullInitialization`
unconditionally called `errorNYI` for types where `isZeroInitializable`
returns false.
Member pointers use -1 as the null sentinel, so a plain zero store is
incorrect. Replace the `errorNYI` with `emitNullConstant`, which already
builds the correct per-field pattern (-1 for member-pointer fields, zero
elsewhere), and store the result. Types with virtual bases are still
guarded with `errorNYI` since `emitNullConstant` does not yet handle
them.
[CIR] Lower byval/byref args in CallConvLowering
ArgKind::Indirect arguments were hitting an errorNYI in
CIRABIRewriteContext. Add the lowering: in the callee the block argument
type changes to !cir.ptr<T>, a load is inserted at entry so the body sees
the original value type, and llvm.byval or llvm.byref is attached based on
ownership. At call sites, both byval and byref are lowered by allocating a
stack slot, copying the value in, and passing the pointer.
For byval, llvm.noalias and llvm.noundef are also added -- llvm.noalias
because the call-site rewrite always produces a fresh alloca+store
(equivalent to -fpass-by-value-is-noalias), and llvm.noundef because the
copy is always fully defined. byref carries only llvm.byref and llvm.align
since it does not assert exclusive ownership.
Add no-arg constructor and EraseIf method to MultiplexExternalSemaSource (#204458)
The no-arg constructor makes MultiplexExternalSemaSource usable in
situations where two child sources are not immediately available, or
where conditional logic makes it easier to call AddSource rather than
immediately pass child sources to the constructor.
The EraseIf method allows sources to be removed later if they are no
longer needed.
Co-authored-by: Nicholas Bishop <nicholsabishop at google.com>
[SimpleLoopUnswitch] Reland "Generalize the notion of trivial unswitching" (#204934)
In the original PR for this feature, the third parameter of
`MemorySSAUpdater::applyUpdates` was not set to `true`. This
caused `DT` to be invalid, resulting in the failures. This PR fixes the
issue and provides an additional testcase.
Also in the original commit had three asserts to confirm
`!ModifiedBranch ` when we bail out. One of these is redundant because
it is enclosed in an `if` statement checking the same condition. This PR removes
the redundant `assert` too.
Revert "Reapply "[InstCombine] Merge consecutive assumes" (#205177)" (#205380)
This surfaces a bug likely fixed by
https://github.com/llvm/llvm-project/pull/205275. Once that lands this
patch can be landed again.
Reverts llvm/llvm-project#205324
NAS-139535 / 25.10.5 / Decode CHANGE-without-DELETE_CHILD share ACL mask as CHANGE
A customer's `sharing.smb.getacl` crashed with `ValueError: 1245631 is not a
valid SDDLAccessMaskStandard` because the stored share ACL contained an ACE with
access mask 0x1301BF -- the CHANGE preset (0x1301FF) minus the
SEC_DIR_DELETE_CHILD bit (0x40). Such masks are produced by some Windows versions
/ older Samba / sharesec shell edits. `sd_bytes_to_share_acl` looked the mask up
directly in the SDDLAccessMaskStandard enum, which raised for the unrecognized
value and returned a 500 from getacl, so the admin could neither view nor fix the
share ACL.
Normalize this known equivalent mask to CHANGE at the single decode site. This
keeps the returned `ae_perm` within the existing API schema
(Literal['FULL','CHANGE','READ']) so there is no public API surface change --
appropriate for a hotfix release. Surfacing a new "CUSTOM" value (as the full
NAS-139535 fix does on master) was deliberately avoided here: it is not in the
v25_10_4 schema, so it raises pydantic ValidationError at result serialization --
swallowed in production only via dump_result_allow_fallback (logging a warning on
every read) and raised outright under the test harness.
[3 lines not shown]
Add limited vtable address querying to `clang::CodeGenerator` (#202807)
This is being used in Carbon (
https://github.com/carbon-language/carbon-lang/pull/7323 ) to implement
cross-language overriding.
I realize this isn't the fully general feature needed for virtual bases,
etc - but this limited functionality is already wrapped up for, if I
understand it correctly, constexpr use cases and some others. So
hopefully it's still something folks feel is general enough to be
worthwhile exporting. For now Carbon doesn't support deriving from a
type with virtual bases, so the extra complexity isn't needed.
[TableGen] Use llvm_unreachable in switch guard for all except gcc 8-
Follow-up to https://github.com/llvm/llvm-project/pull/194728.
For gccs older than v9 use abort. That seems to make everybody happy.