[lldb] Support building lldbHost under Emscripten (#223206)
This builds on the new `HostInfoEmscripten` and `PlatformEmscripten`
support.
Emscripten provides many POSIX APIs, but it does not support `fork` or
native host process management. This patch allows `lldbHost` to build
under Emscripten without treating it as Linux.
It:
- avoids building the `ProcessLauncherPosixFork` implementation;
- adds a small Emscripten Host implementation;
- reports process enumeration, process lookup, launching and shell
expansion as unsupported.
The remaining generic POSIX Host functionality continues to be used.
This is enough for the current libLLDB and SB API experiment, while live
process debugging will be handled separately once we have an in-browser
execution backend.
[RISCV] Replace decodeImmThreeOperand/decodeImmFourOperand with a template function. NFC (#223924)
Make the immediate a template argument that we can be provided in the
DecoderMethod name.
Fix zfs.resource.create not-found messages and tier test gating
## Problem
Two separate defects turned up running the `zfs.resource.create` integration tests. `ZFSPathNotFoundException` stores an already-formatted message in `args[0]`, and the create handler pulled that out and repr'd it a second time, so a missing pool surfaced as `Pool "'sometank' not found" does not exist.` rather than naming the pool cleanly; the parent-dataset variant read the same way. Separately, the `tier_pool` fixture gated on `system.is_enterprise`, which does not exist, so the three tiering tests errored with `Method does not exist` on every system instead of either running or skipping.
## Solution
- **Not-found messages**: the exception now keeps the raw path in `self.path`, mirroring what `ZFSPathHasClonesException` already does, and the create handler formats from that instead. Every raise site already passes a bare path, and this was the only place in the plugin treating `args[0]` as one.
- **Tier tests**: use the `entitled` integration-test asset to mock `truenas.entitlements.check` for ZFSTIER. Checking the live entitlement instead would just skip these tests everywhere that isn't licensed for tiering, which is most of our test fleet; mocking it means they actually build the tier pool and exercise the placement and dedup paths.
[RISCV] Update Zvzip support to v0.3 (#210603)
This updates the experimental Zvzip implementation to match the
v0.3 draft specification from RISC-V ISA manual PR:
https://github.com/riscv/riscv-isa-manual/pull/3233
In Zvzip 0.3, `vtype` and `vl` describe the destination vector for all
five instructions:
- `vzip.vv` produces a destination with EMUL=LMUL from two source
operands with EMUL=LMUL/2. Its mask is indexed by destination
elements and therefore has the mask type associated with the result
vector. The overlap rule of `vzip.vv` matches widening vector
arithmetic instructions;
- `vunzipe.v` and `vunzipo.v` produce a destination with EMUL=LMUL
from a source operand with EMUL=2*LMUL.
[17 lines not shown]
Add interrupt support to pcfiic.
Make the repeat-start logic in the non-interrupt case simpler.
Add comments to softc fields.
By using interrupts, we greatly reduce the system time and wall clock time
used during i2c operations.
On machines where interrupts are not supported, the front end can set
the sc_poll flag to true, and the driver will use the polling path.
[clang] Fix Itanium mangler crash on lambdas in top-level statements (#217041)
`clang-repl` asserts when a lambda in a top-level statement needs a
mangled name, for example `ns::call([]{});`. Since #84150 a
`TopLevelStmtDecl` is a `DeclContext`, and `manglePrefix` casts it to
`NamedDecl`.
Treat `TopLevelStmtDecl` as a local container and give it a synthesized
internal encoding (`L9__stmt__0v`), like `Ub_` for block literals.
Entities in a top-level statement then mangle as `<local-name>`s with
discriminators, so same-named locals in two statements do not collide.
Each `TopLevelStmtDecl` gets an ordinal at creation, in parse order; it
is serialized.
Tests: `Interpreter/lambda-top-level-stmt.cpp` (crashes without the fix)
and `CodeGenCXX/top-level-stmt-local-names.cpp` (two lambdas, two
same-named local classes). The interpreter test is `UNSUPPORTED:
system-windows`: MSVC compat enables `-fdelayed-template-parsing`, and
clang-repl asserts on any late-parsed template in a later fragment,
[2 lines not shown]
[clang][NVPTX] Emit !atomic.ignore.denormal.mode for CUDA atomics
CUDA's atomicAdd() family is defined in terms of PTX atom.add, whose
denormal behavior is fixed by the hardware. Without any annotation the
backend has to assume the function's denormal mode must be honored and
expands these into CAS loops whenever the two disagree. Mark them with
!atomic.ignore.denormal.mode so the native instruction is used.
That covers the __nvvm_atom_*_add_gen_f builtins that atomicAdd(),
atomicAdd_block() and atomicAdd_system() are written in terms of, plus
C11/C++11 atomics under -fatomic-ignore-denormal-mode and the
[[clang::atomic(ignore_denormal_mode)]] attribute, which requires
teaching the NVPTX target about AtomicOptions.
The condition for when the metadata is meaningful is now shared with the
AMDGPU and SPIR-V targets in addAtomicIgnoreDenormalModeMetadata(). It
takes an AllowHalf flag because whether f16 denormals are observable is
target specific: PTX exposes no FTZ control for f16 operations, so
atom.add.f16 never flushes and the opt-in is meaningful there, whereas
[3 lines not shown]
[NVPTX] Honor !atomic.ignore.denormal.mode on atomicrmw fadd
PTX atom.add has a fixed denormal behavior that the program cannot
control: atom.add.f32 flushes denormals on global memory prior to
PTX 9.4 / SM90 (which added atom.add.noftz.f32), and PTX still has no
flushing atom.add.ftz.f32 for shared/generic memory or atom.add.ftz.f16.
When that disagrees with the function's denormal mode, the backend
expands the atomic into a CAS loop so the denormal behavior is
preserved.
!atomic.ignore.denormal.mode says the denormal behavior of this
particular atomic does not matter, so use the native instruction even
when it disagrees. This is the same thing -nvptx-allow-ftz-atomics does,
except per-instruction instead of per-compilation, which lets a frontend
opt in only the operations it knows about -- notably CUDA's atomicAdd(),
which is defined in terms of atom.add.
Note that -nvptx-allow-ftz-atomics defaults to true, so the new behavior
is only observable with -nvptx-allow-ftz-atomics=false.
[2 lines not shown]
[CIR][NFC] Restore LoadOp builders, LowerToLLVM, and CIRGenBuiltin fixes lost in #222481 (#223896)
Commit 35c6acb89abf (#222481) accidentally reverted parts of
cc5e9d63b4dc (#222822) in `CIROps.td`, `LowerToLLVM.cpp`, and
`CIRGenBuiltin.cpp`, which broke Linux CI with deprecation and template
instantiation errors.
This change restores those lost changes:
1. Re-adds `LoadOp` custom builders in `CIROps.td` so calls to
`cir::LoadOp::create(builder, loc, addr)` and
`cir::LoadOp::create(builder, loc, resultTy, addr)` do not resolve to
deprecated MLIR collective builders.
2. Restores `lowerConstrainableFPOp` in `LowerToLLVM.cpp` to pass
default properties and type range to `replaceOpWithNewOp`.
3. Restores `emitUnaryFPBuiltin` in `CIRGenBuiltin.cpp` to use
non-deprecated `Operation::create(cgf.getBuilder(), arg.getLoc(), arg)`.
Diagnosed by Antigravity, formatted with Gemini
Unlink multicast records when their interface is detached
Nothing dropped ifp->if_maddrlist at detach, so a socket that had
joined a group left its struct in_multi/in6_multi linked into the
ifnet that if_detach() then freed, holding a bare if_index. When the
socket finally dropped the membership, in_delmulti() resolved that
index; once if_idxmap_alloc() had wrapped the 16-bit space and handed
it to another interface, the TAILQ_REMOVE wrote through a tqe_prev
pointing into the freed ifnet and left the innocent interface tqh_last
pointing there too.
Unlink the records in in_ifdetach() and in6_ifdetach() and clear the
index; the sockets still reference them, so they are freed as before
when the last one goes away.
OK claudio@
Reported-by: syzbot+06aeb6036c2434fc1cd8 at syzkaller.appspotmail.com
Reported-by: syzbot+eefbaca0eb56be2757c2 at syzkaller.appspotmail.com
Reported-by: syzbot+f1e5d22909ea93b08bd4 at syzkaller.appspotmail.com
Refactor vmm(4) exit handling and correct RIP adjustment.
Make all exit handlers return a enum type that drives the vcpu run
loop instead of an errno that has overloaded semantic meaning.
Centralize and correct some RIP adjustment now that we have NRIPS
guaranteed on SVM systems. In some cases, vmm(4) was advancing RIP
when exceptions were being raised on a vcpu.
ok mlarkin@
www/{nginx,nginx-devel,freenginx}: 3rd-party modules management
Use the new www/nginx-module-vod source port instead of fetching
nginx-vod-module from GitHub.
Sponsored by: Netzkommune GmbH