Services: Captive Portal: Administration - template upload that isn't a zip, template in use (#11410)
* Services: Captive Portal: Administration - report a template that isn't a zip
strip_template.py answers its other problems as an error, but data that
isn't a zip makes zipfile raise BadZipFile, so saveTemplateAction()
returned error null and the page reported the upload as saved while
nothing was stored.
* Services: Captive Portal: Administration - refuse deleting a template a zone uses
The zone kept the deleted template's uuid, and its next save failed
with "Related template not found."
[DAG] Generalize sign-bit extraction in visitAND to low-bit masks (#248920)
Generalize (and (srl X, C), 1) to masks with B low bits set. Fold the
shift and mask to (srl X, BW - B) when C < BW - B and all bits from C
through the MSB are copies of the sign bit.
For masks wider than one bit, require a scalar SRL with a single use.
Preserve the existing one-bit fold for vectors and multi-use shifts.
Update code generation checks across several targets. The main benefit
is that some sdiv and srem cases need fewer instructions to compute
the bias.
[sanitizer] report libbacktrace errors on verbose mode (#243083)
Those errors could give clues why a backtrace is missing. Hence, log
them but only when verbose > 1.
Issue: https://github.com/llvm/llvm-project/issues/243075
[AMDGPU] Fold add into integer wmma accumulator (#248304)
Integer wmma and swmmac wrap on overflow when clamp is off, so adding X
to the result is the same as adding X to the accumulator. Fold the add
when the accumulator is zero or both are constants. Because wmma is
convergent, the call is only moved to the add when both are in the same
block.
```llvm
%d = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8.v8i32.v2i32(i1 0, <2 x i32> %a, i1 0, <2 x i32> %b, <8 x i32> zeroinitializer, i1 0)
%r = add <8 x i32> %d, %x
-->
%r = call <8 x i32> @llvm.amdgcn.wmma.i32.16x16x16.iu8.v8i32.v2i32(i1 0, <2 x i32> %a, i1 0, <2 x i32> %b, <8 x i32> %x, i1 0)
```
[sanitizer] don't pass initial filename to libbacktrace (#243082)
Libbacktrace knows how to find the executable name for its supported
platforms. Passing an initial filename prevents this lookup phase.
Issue: https://github.com/llvm/llvm-project/issues/243075
[DAGCombiner] Don't treat bitcast+extract_subvector as a truncate on big-endian (#245146)
Fixes #244527
`(zext/aext (and (bitcast (extract_subvector vNi1, 0) to iK), cst))` was
folded into an AND on the wider bitcast, which assumes
`bitcast(extract_subvector(X, 0))` is `trunc(bitcast(X))`. That only
holds on little-endian: per LangRef a `<N x i1>` bitcast follows the
element order of the target, so on big-endian lane 0 is the most
significant bit and the masked low bits select the last K lanes. On
aarch64_be the reproducer read lanes 24..31 instead of 8..15, and mips
and s390x do the same.
Guards that branch in both folds with
`DAG.getDataLayout().isLittleEndian()` and leaves big-endian to the
generic lowering, which is already correct. The truncate branch is
untouched.
Test: `bitcast-extract-subvector-and-zext.ll` covers both folds for
[8 lines not shown]
[AArch64] Fix big-endian SVE truncation of fixed-length vectors (#246756)
On big-endian AArch64, lowering a fixed-length integer vector `trunc`
through SVE can keep the high half of each element. The generic
`BITCAST` reverses bytes when the element width changes, so `UZP1` can
select the wrong half.
Use `AArch64ISD::NVCAST` before each `UZP1` to preserve the register
layout and select the low half. The regression test reproduces the bug
on `main` with a plain `trunc` from `<8 x i64>` to `<8 x i8>`,
exercising all three narrowing steps.
I found this while testing the 32- and 64-lane mask optimization in
#246755 on big-endian SVE.
[NVPTX] Add support for lround and llround intrinsics for f16 and bf16 (#240078)
add support for lround and llround intrinsics for f16 and bf16 by
promoting them to f32.
fixes #239041
used claude for writing code comments
[sanitizer_common][lsan] Keep the original allocation alive when realloc fails (#222849)
CombinedAllocator::Reallocate() deallocated the original chunk even when
the replacement allocation failed, and __lsan::Reallocate() unregistered
the pointer before asking for that replacement. A failing realloc()
therefore released memory the caller still owned: a free hook fired for
a
live pointer, and a later malloc() handed the same chunk out again.
Return early in the allocator, and in LSan allocate the replacement
before releasing the original, the way ASan and HWASan already do it.
Going through __lsan::Allocate() also makes realloc() honor
allocator_may_return_null, and tracks realloc(NULL, 0) as the malloc(0)
it is rather than as a zero-sized allocation.
Assisted-by: Claude Opus 5
---------
Co-authored-by: Vitaly Buka <vitalybuka at google.com>
[Clang] Use the last macro prefix map for duplicate prefixes (#249124)
Use the last destination when multiple macro prefix maps have the same
source prefix. This makes repeated -ffile-prefix-map options consistent
with their debug and coverage mappings.
Fixes #157721
Assisted-by: OpenAI Codex
[mlir][affine] Load the memref dialect in affine-super-vectorize (#247728)
Since #243425, -affine-super-vectorize masks transfers on dynamic
memrefs with memref.dim, but the pass doesn't load the memref dialect.
If the input has no memref ops, it crashes:
```mlir
func.func @f(%src: memref<?xf32>, %dst: memref<64xf32>) {
affine.for %i = 0 to 64 {
%v = affine.load %src[%i] : memref<?xf32>
affine.store %v, %dst[%i] : memref<64xf32>
}
return
}
```
```
$ mlir-opt f.mlir -affine-super-vectorize=virtual-vector-size=8
LLVM ERROR: Building op `memref.dim` but it isn't known in this MLIRContext: the dialect may not be loaded or this operation hasn't been added by the dialect. See also https://mlir.llvm.org/getting_started/Faq/#registered-loaded-dependent-whats-up-with-dialects-management
```
[7 lines not shown]
py-xmltodict: updated to 1.0.6
1.0.6
Bug Fixes
parse: preserve text across input chunks
preserve attribute local name when namespace prefix is empty
streaming: discard ancestor data while preserving comment postprocessor calls
unparse: close the start tag before writing a comment with short empty elements
unparse: check namespace bindings and speed up text validation
unparse: use a colon for XML namespace prefixes
unparse: preserve carriage returns
unparse: reject invalid XML characters in text, attribute values, and namespace declarations
Documentation
clarify how force_cdata stores element text
fix streaming cache examples