[NFC][clang-sycl-linker] Apply LLVM coding standards to ClangSYCLLinker.cpp (#200543)
Bring the file in line with llvm/docs/CodingStandards.rst without
changing
behavior:
- Restore the canonical //===---===// file-header banner.
- Move free functions out of the anonymous namespace and mark them
`static`; keep only types (LinkerOptTable, LinkResult, SplitModule,
IRSplitMode, EntryPointCategorizer) inside anonymous namespaces.
- Rename a local `OutputFile` in createTempFile to `Path` to stop it
shadowing the file-scope `OutputFile`.
- Rename the inner `Err` in runCodeGen to `MatErr` to stop it shadowing
the surrounding `SMDiagnostic Err`.
- Normalize parameter-name comments to the `/*Name=*/value` form.
- Strip quotes from Doxygen `\param 'Name'` directives.
Co-Authored-By: Claude
[clang] fix transformation of SubstNonTypeTemplateParmExpr nodes from typealiases and concepts
This makes sure SubstNonTypeTemplateParmExpr produced from non-specialization
decls (Type alias templates and concepts) are correctly transformed.
This makes the SubstNonTypeTemplateParmExpr store the parameter type directly,
and uses that instead of relying on the AssociatedDecl.
Fixes #191738
Fixes #196375
[clang] fix transformation of SubstNonTypeTemplateParmExpr nodes from typealiases and concepts
This makes sure SubstNonTypeTemplateParmExpr produced from non-specialization
decls (Type alias templates and concepts) are correctly transformed.
This makes the SubstNonTypeTemplateParmExpr store the parameter type directly,
and uses that instead of relying on the AssociatedDecl.
Fixes #191738
Fixes #196375
[cuda][flang] Diagnose missing CUDA intrinsic modules in Flang semantics (#200509)
- Replace CUDA intrinsic module `CHECK`s with actionable diagnostics
when `cudadevice` or `__cuda_builtins` cannot be read.
- Avoid dereferencing missing CUDA module scopes during implicit CUDA
symbol import.
- Add a semantics test covering the missing CUDA intrinsic module
diagnostic.
[lldb][Windows] Use captured error in ConnectionGenericFile::Read (#200803)
Use the captured value on both branches so the reported error matches
the one that was tested against.
[libc] Add netinet/udp.h containing struct udphdr (#200839)
This patch adds a generated <netinet/udp.h> containing the `udphdr`
structure definition.
There are two styles ("linux" and "BSD") of udphdr field names (and both
of them can be found in the wild), so I follow the glibc and bionic
approach of using an anonymous union. (musl uses a #define on the field
names, which doesn't seem that great).
I've added the target to `include/CMakeLists.txt` and registered it
under target lists in `headers.txt` for the supported Linux platforms
(x86_64, aarch64, and riscv).
To verify layout and alignment correctness, I've added a layout and
field compatibility unit test under `test/src/netinet/udp_test.cpp`.
Assisted by Gemini.
[Clang][AMDGPU] Restore the non-RDC compilation pipeline
The new offload driver uses the LTO compilation pipeline even for non-RDC
compilation. This PR restores the conventional non-RDC flow, where the backend
generates executable code directly, which is then bundled into the HIP fat
binary.
We can revert this change in the future if we decide to deprecate the
distinction between non-RDC and RDC compilation and unify the compilation flow.
[mlir][spirv][tosa] Add remaining TOSA 1.0 SPIR-V TOSA ops (#200383)
Add conversion patterns for additional TOSA 1.0 operations targeting the
SPIR-V TOSA extended instruction set.
This covers pooling and convolution ops, FFT/RFFT, matmul, concat, pad,
rescale, const, const_shape, and identity. Concat is split into
conservative chunks to avoid producing SPIR-V instructions with too many
operands.
Add a multi-result conversion pattern for FFT/RFFT and share the
convolution replacement logic for conv2d, conv3d, and depthwise_conv2d
while keeping transpose_conv2d explicit because it has different
attributes.
Also share constant attribute conversion for const and const_shape,
including integer element type conversions such as index to i32, i4 to
i8, and i48 to i64, and preserve the empty const_shape edge case.
[2 lines not shown]
[LLVM][IR] Make sure that DILabel's line is always printed
This commit ensures that the textual IR of the DILabel always contains
the `line` information. This is required as the absence of a line causes
a parsing failure, i.e., this change fixes the print + parse roundtrip.
A privileged guest can make the host-side `vioblk` backend read a descriptor
outside the configured virtqueue descriptor table and interpret the out-of-table
entry as a block request descriptor. In the confirmed run, the guest-controlled
out-of-table descriptor made `vmd(8)` read and log a guest-chosen block command
value, and the device entered `DEVICE_NEEDS_RESET`.
from Quarkslab
from deraadt@; ok hshoexer, mlarkin
A privileged guest can notify one invalid virtio-block queue index and
terminate the host-side `vioblk` device process. In the confirmed run, this
also caused the VM event thread to exit unexpectedly.
from Quarkslab
from deraadt@; ok hshoexer, mlarkin
Do not call `fatalx()` on malformed guest-provided descriptor lengths. Reject
the request and return without terminating the VM process.
from Quarkslab
from deraadt@; ok hshoexer, mlarkin
[26 lines not shown]
[NFC][lldb][windows] break down NativeProcessWindows::OnDebugException (#200832)
This patch breaks down `NativeProcessWindows::OnDebugException` into 3
different handlers (one for each exception) for readability.
[BOLT] Support multiple perf data inputs
Allow multiple -p/-perfdata args (comma-separated and repeated).
Process them in parallel with `--perfdata-jobs/-pj` (default 4,
0 for all available hardware threads). Keep YAML/DataReader
inputs single-profile only.
This also enables density computation with multiple perf files.
Prior to that, it was impossible to compute total density as
it wasn't computed from symbolized profiles.
Depends on
#199323
#199322
#199321
#199320
Test Plan:
Updated pre-aggregated-perf.test and perf_test
[11 lines not shown]
A privileged guest can make the host-side `vioblk` backend read a descriptor
outside the configured virtqueue descriptor table and interpret the out-of-table
entry as a block request descriptor. In the confirmed run, the guest-controlled
out-of-table descriptor made `vmd(8)` read and log a guest-chosen block command
value, and the device entered `DEVICE_NEEDS_RESET`.
from Quarkslab
from deraadt@; ok hshoexer, mlarkin
A privileged guest can notify one invalid virtio-block queue index and
terminate the host-side `vioblk` device process. In the confirmed run, this
also caused the VM event thread to exit unexpectedly.
from Quarkslab
from deraadt@; ok hshoexer, mlarkin
Do not call `fatalx()` on malformed guest-provided descriptor lengths. Reject
the request and return without terminating the VM process.
from Quarkslab
from deraadt@; ok hshoexer, mlarkin
[37 lines not shown]
MAC/do: Fix double-free on parse error after "executable paths" feature
parse_rules() has been calling toast_rules() in case of a parse error in
order to deallocate the 'struct rule' objects it has constructed up to
that point.
toast_rules() would take a pointer to a full 'struct rules' object, and
besides freeing all 'struct rule' referenced by it, would also free the
holding 'struct rules' itself.
With the introduction of the "executable paths" feature, and the
embedding of 'struct rules' into 'struct conf', meaning that the
lifecycle for 'struct rules' was no longer independent, toast_rules()
was changed not to free the passed 'struct rules' (as it was a field of
a 'struct conf' object). Unfortunately, this change was not completed
with a reinitialization of the rules list head, so the 'struct conf'
object would continue to reference just-freed rules, which then would be
freed a second time on destruction of that container.
[16 lines not shown]
[flang][OpenMP] Restricting Integration test atomic-capture-release.f90 run to x86 and aarch64 (#200770)
Similar to the the change in
`flang/test/Integration/OpenMP/atomic-compare.f90`, restricting the test
case `flang/test/Integration/OpenMP/atomic-capture-release.f90` to run
on
`x86-registered-target & aarch64-registered-target`
This also Fixes
[#200729](https://github.com/llvm/llvm-project/issues/200729)
A comment has been added to the merge in
[[Flang][OpenMP]Handling restrictions of using Memory-Order-Clause with
Atomic-Clause](https://github.com/llvm/llvm-project/pull/199636)
>LLVM Buildbot has detected a new failure on builder
ppc64le-mlir-rhel-clang running on ppc64le-mlir-rhel-test while building
flang,llvm,mlir at step 4 "cmake-configure".
Full details are available at:
[4 lines not shown]
[LoopInterchange] Add test where loop has memory-affected calls (NFC) (#200827)
This patch adds the following two test cases:
- There is a call to a function with `memory(write)` in the loop nest,
which is taken from #200796.
- There is a call to a function with `memory(none)` in the loop nest.
For the former case, we are not allowed to interchange the loops because
the function call may write to an unknown memory location, but the
transformation is still applied, i.e., a miscompilation. As for the
latter case, the call should not prevent the loops from being
interchanged, which seems to be the original intention of the code.
Validate encrypted queue buffer sizes before processing auth tag
and IV data: current callers already treat malformed input as a
decrypt failure but rejecting truncated buffers earlier makes
boundary conditions more explicit.
from gilles@; diff by Stuart Thomas <stuart.thomas at triageforge.co.uk>
Ensure pending asynchronous lookups do not retain dangling smtp_session
references after teardown.
This is mainly a robustness fix inside the privsep model: stale
references may permit lateral effects between smtpd processes after
another compromise.
from gilles@; diff by Stuart Thomas <stuart.thomas at triageforge.co.uk>
Zero the temporary envelope parsing buffers before use.
While current parsing paths do not expose uninitialized data, keeping
stack residue in these transient buffers unnecessarily weakens
compartmentalization and may aid lateral movement inside the privsep
[24 lines not shown]
Validate encrypted queue buffer sizes before processing auth tag
and IV data: current callers already treat malformed input as a
decrypt failure but rejecting truncated buffers earlier makes
boundary conditions more explicit.
from gilles@; diff by Stuart Thomas <stuart.thomas at triageforge.co.uk>
Ensure pending asynchronous lookups do not retain dangling smtp_session
references after teardown.
This is mainly a robustness fix inside the privsep model: stale
references may permit lateral effects between smtpd processes after
another compromise.
from gilles@; diff by Stuart Thomas <stuart.thomas at triageforge.co.uk>
Zero the temporary envelope parsing buffers before use.
While current parsing paths do not expose uninitialized data, keeping
stack residue in these transient buffers unnecessarily weakens
compartmentalization and may aid lateral movement inside the privsep
[24 lines not shown]
[llvm-objcopy] Strip header from DXContainer's ILDB part during `--dump-section` (#198578)
This strips the header from ILDB part of DXContainer during
`llvm-objcopy --dump-section`, so that the output contains bitcode only.