[asan] Complete the report when a stack frame has no valid header (#243684)
If a stack frame's magic number is missing, a CHECK fails while the
report is being prepared and the error itself is never printed:
```
CHECK failed: asan_thread.cpp "((ptr[0] == kCurrentStackFrameMagic)) != (0)"
```
Return "no frame found" instead, so the report completes and names the
thread whose stack holds the address. `__asan_locate_address` and
`__asan_describe_address` no longer die on such an address either.
Users hit this CHECK in google/sanitizers#1010, google/sanitizers#1531
and google/sanitizers#1669 (not reproduced).
Assisted-by: Claude. I have read every line of this PR.
[asan] Handle free-size-mismatch in __asan_get_report_dealloc_address (#243682)
`__asan_get_report_dealloc_address` returns 0 for free-size-mismatch
(`free_sized`, `free_aligned_sized`), so an `__asan_on_error` callback
or a debugger cannot get the address. Return the pointer and the size
that the caller passed, as for new-delete-type-mismatch.
Assisted-by: Claude. I have read every line of this PR.
net/wol: use hostwatch dump_full for dual-stack online status in widget (#5980)
Add WolController::getHostStatusAction() (/api/wol/wol/get_host_status) querying configd 'hostwatch dump_full' (list_hosts.py -v -n) to determine online status across both IPv4 and IPv6.
In discovery mode, mark hosts online when at least one entry for the configured physical interface and MAC was seen within the last 300 seconds (server UTC clock). In arp-ndp fallback mode (when hostwatch is disabled), fall back to live ARP/NDP presence.
Matching across all host entries per physical interface and lowercased MAC also resolves multi-IP and multi-interface MAC lookups (#5790).
Update WakeOnLan.js and Metadata/WakeOnLan.xml to use the new endpoint, and remove the now-unused api/diagnostics/interface/get_arp* pattern from ACL.xml.
Closes #5976
[asan] Drop repeated address checks from __asan_region_is_poisoned (#242408)
`__asan_region_is_poisoned` checks both ends of the region with
`AddrIsInMem`, and `MemToShadow` then checks them again. Use
`MEM_TO_SHADOW` directly and drop the redundant rounding and CHECKs.
Interceptors call this for every range above 64 bytes (32 on 32-bit).
For heap and stack ranges on x86_64 Linux it saves about 60 instructions
per call (190 to 131 for 65 bytes).
Assisted-by: Claude. I have read every line of this PR.
[AMDGPU] Ignore debug uses when choosing the i1 lane-mask lowering (#244887)
SILowerI1Copies decides whether an i1 value defined in a loop is
observed
outside the loop from the blocks of all its uses, DBG_VALUEs included. A
DBG_VALUE of a divergent i1 loop phi or copy in the loop exit block
therefore
selects the loop lowering, and -g adds lane-mask merge instructions
(s_andn2/s_or) to the loop and uses extra SGPRs.
Use use_nodbg_instructions in both places that build this bound,
PhiLoweringHelper::mergeIncomingLaneMasks and
Vreg1LoweringHelper::lowerCopiesToI1. The new test checks the same
output
with and without debugify for a loop phi and for a copy.
Fixes llvm/llvm-project#242595
[AMDGPU] Stop DBG_VALUEs in a bundle from changing the post-RA schedule (#244891)
SIInstrInfo::getInstrLatency gives a BUNDLE the largest latency of its
instructions plus one cycle for each additional instruction.
SIPostRABundler
keeps meta instructions between the memory instructions of a clause, so
each
DBG_VALUE inside the bundle adds a cycle, and -g changes the post-RA
schedule.
For example, in a kernel that calls a function and then uses its pointer
argument, -g reorders the kernel argument loads and the scratch setup.
Skip debug instructions when computing the latency of a bundle, since
they
do not issue. The new test checks the same schedule with and without the
debug
info.
[PowerPC] Do not read FPSCR for a SETRNDi/SETFLM result with only debug uses (#242640)
The `SETRNDi` and `SETFLM` custom inserters emit an `IMPLICIT_DEF`
instead
of `mffs` when the old FPSCR value is unused, but they test this with
`use_empty()`, which counts `DBG_VALUE`s. A variable that keeps the old
value, such as `double old = __builtin_setrnd(1);` with `old` otherwise
unused, therefore adds an `mffs` under `-g`.
Use `use_nodbg_empty()`. The old value is then no longer computed, so
mark
its debug uses undef.
The new functions in `setrnd.ll` use the result of `llvm.ppc.setrnd`
with a
constant (`SETRNDi`) and of `llvm.ppc.setflm` (`SETFLM`) only in a
`#dbg_value`. Without the change `MFFS` is emitted and the debug value
refers to it; with it the result is an `IMPLICIT_DEF`, the debug value
is
[6 lines not shown]
[SPARC] Use the post-RA machine scheduler for LEON5 (#245211)
Enable post-RA scheduling in the LEON5 model so that spills, reloads and
similar added after the pre-RA scheduler are scheduled too.
Use the post-RA machine scheduler, as the LEON5 model has no itineraries
for the list scheduler. No other SPARC processor enables post-RA
scheduling, so only LEON5 is affected.
Assisted-by: Claude
[CMake] Drop `LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES` (#246232)
CMP0156 automatically de-duplicates libraries on link lines based on
linker capabilities.
See https://cmake.org/cmake/help/latest/policy/CMP0156.html.
IDS: optional eve QUIC logging (#11350)
Suricata logs QUIC transactions (version, SNI, user agent, JA3 and
JA4) with the quic eve type, but the file output only offers HTTP and TLS.
Add an advanced checkbox like the TLS one. Off by default; the generated
suricata.yaml is unchanged unless it is enabled.
[C++20][Modules] Preserve cleanups in default argument updates (#240633)
Ok, this fixes a header units bug for us, but relates to all
serialization, incl PCH.
Clang can miscompile a call that uses a default argument instantiated in
another module or PCH. We hit this with a function-local `static
std::string`: an exception after initialization reset its guard, so the
next call constructed it again and registered a second destructor,
causing a double free at exit when using sanitizers.
The problem is in `CXXInstantiatedDefaultArgument` updates. These record
default arguments instantiated outside the AST file that declared the
parameter. The writer uses `getDefaultArg()`, which strips the outer
`ExprWithCleanups`. The importing TU then misses the full-expression
cleanup boundary. A temporary's cleanup stays on the stack too long, and
`EmitGuardedInit` pops it instead of the guard-abort cleanup. That
leaves `__cxa_guard_abort` active after the static has been initialized.
[57 lines not shown]