NAS-140259 / 25.10.7 / Fix KeyError in alertservice.test error handler (by ixhamza) (by bugclerk) (#19532)
This is a partial backport of the original PR.
- Fix `KeyError` in `alertservice.test` error handler where
`data["type"]` should be `data["attributes"]["type"]`, which masked the
real exception on `send()` failures.
Original PR: https://github.com/truenas/middleware/pull/18449
Original PR: https://github.com/truenas/middleware/pull/18451
---------
Co-authored-by: Ameer Hamza <ahamza at ixsystems.com>
Co-authored-by: caleb <yocalebo at gmail.com>
[RISCV] Use SLLI+ADD for a select of constants that differ by a power of 2 in more cases. (#217812)
Previously we restricted to cases that can use ADDI, but we need
to materialize a constant for the czero+add lowering. Using slli
avoids materializing the delta constant.
I'm restricting to cases where we can't fold the comparison into
the czero.
[libc][math] Add some explicit macro checks to round and roundf. (#217822)
This will allow users to use them without going through our cmake build
checks or forcing the flag `__LIBC_USE_BUILTIN_ROUND`.
[Transforms] Remove dead declarations (#217829)
reportOrPersistProfileStats: Added on March 28, 2024 in commit
1d99d7a6f841de594b38936a4a73866b23a8b105 without a corresponding
function definition.
optimizeStrNCpy: The corresponding function definition was removed on
September 27, 2022 in commit e80e134c77bb093370a3e4fee41ebe8710e3564d.
[IVDescriptors] Implement MonotonicDescriptor
RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442
"Monotonic" variable is similar to induction variable, but its value is updated under some condition, e.g.:
```
int idx = 0;
for(int i = 0; i < n; ++i) {
// some uses of idx
if (cond)
++idx;
}
```
In this example, `i` is induction variable and `idx` is monotonic variable: it's updated only when cond == true. In LLVM IR, this looks like:
```
loop_header:
%monotonic_phi = [%start, %prehader], [ %chain_phi0, %latch]
step_bb:
[26 lines not shown]
NAS-142234 / 27.0.0-BETA.1 / Use `configparser` to generate rclone configs (#19514)
This prevents us from generating invalid ini files by escaping invalid
characters.
[RISCV] Use the value type rather than the pointer type of a global when determining if an allocation granule makes sense. (#217924)
Further attempt to fix RISCV stage2 failure introduced by
f6ea145aa8e89631ae04f72df32580b20256d40c.
Fix SNMP trap alerts failing to load TRUENAS-MIB
Commit 6a01cb9b removed the pre-compiled TRUENAS-MIB.py from
/usr/local/share/pysnmp/mibs/, but the SNMP trap alert service still
expected to load the MIB as a pre-compiled .py file from that path.
Replace with pySMI's addMibCompiler to compile the ASN.1 .txt MIB source
on-the-fly instead.
(cherry picked from commit fe66b2efd3de268454d5d0e7c637ef276245e3c9)
(cherry picked from commit 71fc5806d9f3486984a80d5e73bff576f25a78aa)
Fix KeyError in alert service test error handler
The error handler in alertservice.test referenced data["type"] but type
is nested under data["attributes"]["type"]. This caused a KeyError that
replaced the original exception, preventing the real send() failure from
being logged.
(cherry picked from commit 84408bd1857c722086dfb81c52faad0c558f6e93)
(cherry picked from commit 288fa6f4d08ed7ada424e4e48e511e3ff10c46ab)
[lldb] Scope Wasm global reads to a module instance (#213176)
A Wasm global belongs to a module instance, not to a frame. The global
index space is per instance, and `DW_OP_WASM_location`'s global operand
indexes the index space of the instance whose code is being evaluated,
so two instances of one module have separate globals. `qWasmGlobal`
takes a frame index instead, which leaves a global of an instance with
no active frame out of reach.
Name the instance instead: `qWasmGlobal:<index>;instance:<id>;`. The id
is the module id LLDB already carries in bits 61:32 of a Wasm address,
so nothing has to be enumerated first. A stub opts in by advertising
`qWasmInstance+` in its `qSupported` response, which covers every Wasm
packet whose scope is an instance rather than a frame, so a query for
other instance-scoped state does not need a packet of its own. A stub
that does not advertise it keeps getting the frame form.
Linear memory needs no suffix: a Wasm address already carries the id of
the instance it points into, which the documentation now spells out
[9 lines not shown]
security/certmonger: Fix hardcoded paths
The location of the IPA configuration is hardcoded in three source
files, so on FreeBSD certmonger never finds it and every certificate
request fails with "Unable to determine location of IPA LDAP server".
Renewal is affected too, dogtag-ipa-renew-agent-submit carries the same
paths.
PR: 297709
Approved by: crees (maintainer)
Sponsored by: Netzkommune GmbH
(cherry picked from commit 2a0a6d9d4d7e21058908377aff9d6ec101ff3993)
[DWARFLinker] Simplify clang module unit bookkeeping (NFC) (#217758)
RefModuleUnit paired a DWARFFile reference with a CompileUnit, but the
reference was never read and duplicates CompileUnit::getContaingFile(),
so ModulesCompileUnits becomes a plain UnitListTy. Its
addModulesCompileUnit() accessor has no callers, and
DWARFLinkerImpl::ClangModulesMutex is declared but never locked, which
is correct because addObjectFile() is the only writer of ClangModules
and runs serially. Document that instead.
Assert that no module unit is inter-connected. The inter-connected loops
in LinkContext::link iterate CompileUnits alone, so a module unit which
got marked would strand at Stage::Loaded and never be cloned, with the
gate at the top of linkSingleCompileUnit hiding it.
Assisted-by: Claude
[SystemZ][z/OS] Refactor switching section for HLASM (#216824)
Emitting the HLASM instructions for switching section is distributed
between MCAsmInfoGOFF and SystemZHLASMAsmStreamer, with some code
duplication. This change consolidates the implementation in
SystemZHLASMAsmStreamer.