[lldb-dap][test] Do not overwrite failed/error logs. (#227857)
On failure, log files name changes to be unique to a test method. Append
testcase and DAP logs to log_files so it doesn't get overwritten by the
next test method.
[AMDGPU] Validate scale_sel in v_cvt_scale_* (#227475)
These instructions can be block16 or block32 depending on the target
and scale_sel bits. Block16 is not supported in strict mode.
Re-enable the rest of the instructions in the strict mode but validate
the scale selector.
[Polly][Test] Fix missing -plugin-arg (#228221)
After #226773, plugin options must be passed via -plugin-arg. Fix the
regression test from #227311 to the changed command line.
[lldb][Windows] Report a process exit once the process is gone (#228115)
When a debugged process exits, lldb and lldb-server report the exit
while Windows is still tearing the process down. Its executable and DLLs
are still loaded at that point, so a test that deletes or replaces one
of them right after the exit fails with `"access denied"`. This is what
makes `TestReplaceDLL` fail on Windows CI.
This patch reports the exit only after the debugger has released the
exit event and the process has fully terminated, which matches how POSIX
reports an exit.
On a Windows 11 host, `TestReplaceDLL` fails to delete `foo.dll` in 246
out of 640 runs before the change and in 0 of 1,600 after.
rdar://188918066
[OpenMP][clang] Properly handle nested "teams loop"
Treat a nested "teams loop" directive like a "teams distribute" since
it's lowered as such.
Claude assisted with this patch.
[compiler-rt] Add 'csan' library for the concurrency sanitizer
Summary:
Adds the runtime for the concurrency sanitizer, both CPU and GPU.
Fundamentally, this works using the following pseudocode:
```c
static u64 watchpoints[N]; // Hash-indexed, zero is empty.
// Emitted before the access, so we never trip on our own write.
void check_access(volatile void *addr, u32 size, u32 type) {
// Every access probes. A read conflicts only with a watched write, a
// write conflicts with either.
if (u64 *wp = find_watchpoint(addr, size, type))
consume(wp, this_pc()); // Hand our location to the owner.
if (!should_sample()) // Wave-uniform, 1-in-N chance.
return;
[17 lines not shown]
[compiler-rt] Remove dlsym interceptor and support `-shared-libsan` for CSan
Summary:
Follow the UBSan offload runtime. Offload now resolves HSA through the
global scope, so the `dlsym` interceptor is no longer needed. The real
HSA entry points are still taken from the loaded HSA library rather than
`RTLD_NEXT`, since every DSO with a static runtime exports the same
wrappers and they would otherwise chain back into each other.
Build `libclang_rt.csan.so` with the offload objects folded in. The
exported HSA wrappers report failure when HSA is absent and warn when HSA
was loaded ahead of the runtime. The preinit hook moves to a separate
`csan_offload-preinit` archive for executables.
[Clang] Support `-shared-libsan` for offload CSan
Summary:
Follow the UBSan handling. The shared runtime embeds the HSA
interceptors, so `csan_offload` is only linked with static runtimes and
executables pull in `csan_offload-preinit` to initialize early.
[Clang] Add support for the `-fsanitize=concurrency` runtime
Summary:
Add the frontend sanitizer kind, function attributes, pass pipeline
integration, predefined macro, driver handling, and documentation for
ConcurrencySanitizer.
NAS-144155 / 27.0.0 / Read NTP peers from the chronyd socket (by yocalebo) (#19904)
Stop running chronyc and ask chronyd directly over its unix socket.
Replies are checked the same way libchrony checks them. Drop the NTPPeer
wrapper so the alert reads the peer entries as they are. Add a unit test
for the request and reply handling.
Original PR: https://github.com/truenas/middleware/pull/19902
Co-authored-by: Caleb St. John <30729806+yocalebo at users.noreply.github.com>
[LLVM] Add a ConcurrencySanitizer LLVM pass
Summary:
Add an LLVM ConcurrencySanitizer pass to instrument memory and atomic
operations for a sampling race detector. Fundamentally the pass iterates
through every candidate memory operation and adds a check above it.
Unlike TSAN, we do not replace any operations, which heavily simplifies
the instrumentation.
We do not re-use the TSAN instrumentaiton because the appraoches are
different enough and the passes simple enough that the extra code is not
a large concern. More differences will be added in the future, so
keeping them separate is easlier.
[IR] Add the sanitize_concurrency function attribute
This introduces a new concurrency sanitizer attribute to be used with
the runtime of the same name. This has no major change and simply
updates the IR to handle it properly. This attribute is invalid when
combined with the thread sanitizer one as they are mutually exclusive.
NAS-144155 / 28.0.0-BETA.1 / Read NTP peers from the chronyd socket (#19902)
Stop running chronyc and ask chronyd directly over its unix socket.
Replies are checked the same way libchrony checks them. Drop the NTPPeer
wrapper so the alert reads the peer entries as they are. Add a unit test
for the request and reply handling.
ifuncs: Include <machine/ifunc.h> instead of <x86/ifunc.h>
All architectures have been providing an 'ifunc.h' header with
DEFINE_IFUNC() et alter working both in kernel and userland since commit
cf41d1113377 ("riscv: implement kernel ifunc resolution"), and separate
<i386/ifunc.h> and <amd64/ifunc.h> headers were introduced in commit
2b1db07bec92 ("x86: add machine/ifunc.h"), so stop including
<x86/ifunc.h> directly and use the common <machine/ifunc.h> idiom.
While here, re-order includes in the blocks featuring <x86/ifunc.h>,
which requires fixing <x86/apicvar.h> so that it can be included before
<machine/intr_machdep.h>.
Reviewed by: kib
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60194
random: Remove unused include of ifuncs
No functional change (intended).
Reviewed by: markj, emaste
Fixes: 3a12982962ce ("random: add RDSEED as a provably unique entropy source")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60193
Read NVDIMM health from the kernel instead of running ixnvdimm
The NVDIMM alert check ran the ixnvdimm program twice for every module.
That made 24 firmware requests per module every five minutes.
The check used the results of only seven of them.
Any of those requests can fail when kernel memory is fragmented.
The check now asks the kernel directly through a new helper in utils/hardware/nvdimm.py.
It makes three requests per module on each check.
Values that only change on reboot are read once and kept.
A failed request is tried one more time.
If it fails again the check keeps the alerts it already has.
The three warning threshold names now each use their own bit.
ixnvdimm tested the lowest bit for all of them.
[flang-rt] Add headers as a dependency to the runtime (#228210)
Summary:
The flang-rt runtime implicitly depends on the flang compiler's header
gen. We need to depend on the target for the component.
[OpenMP][offload] Fix single-thread SPMD cross-team reductions
If a kernel gets SPMDized by OpenMPOpt but does not have a parallel
region, it actually is only executed by a single thread.
forceSingleThreadPerWorkgroupHelper() is responsible for that and had
been introduced by https://reviews.llvm.org/D133120. The cross-team
reduction trusted that SPMD mode means that we're dealing with all
threads. Now, it checks explicitly.
Claude assisted with this patch.
Stray space change noise Leftover dead code
Stray space change noise Leftover dead code
flangast experiments
clang-format
Stray space change noise
Leftover dead code
clang-format
Post-merge fixes
clang-format