[flang][cuda] Skip device-only specifics at host call sites in generic resolution (#234710)
When CUDA is enabled and the call site is not in a device context, skip
specifics whose only CUDA subprogram attribute is DEVICE. HOST,DEVICE
and
unattributed specifics are unaffected. Call sites inside CUF kernel and
OpenACC regions, which share Scope::Kind::OpenACCConstruct and may be
device code in a host subprogram, are left unfiltered.
[ELF] Reject invalid .eh_frame FDE encoding early in addCie (#235532)
The result does not depend on addresses. It's better than diagnosing it
in EhFrameHeader::updateAllocSize. Diagnose even if --eh-frame-hdr is
not specified.
[ELF] Report invalid .eh_frame CIE references when splitting (#235531)
An FDE with an invalid CIE pointer is diagnosed with Fatal in
EhFrameSection::addRecords, leading to main-run-twice issue. Diagnose in
EhInputSection::split like other malformed records, so that the CIE
index of an FDE is always valid.
linux: Implement PTRACE_GETREGSET NT_PRFPREG and NT_X86_XSTATE
Implement NT_PRFPREG and NT_X86_XSTATE for PTRACE_GETREGSET on amd64.
Chrome's crashpad handler uses these to collect floating-point and
extended CPU register state for crash dumps.
Other architectures retain the previous EINVAL stub behavior.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
PR: 289285
Reviewed by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2165
(cherry picked from commit c515e6040614434a9262ee8b5ac54b81476ec7ff)
linux: Add linux_pt_fpregset and bsd_to_linux_fpregset() for amd64
Add struct linux_pt_fpregset, the amd64 Linux NT_PRFPREG payload,
corresponding to user_i387_struct in Linux. The struct describes
the 512-byte FXSAVE area as exposed by PTRACE_GETREGSET.
Add bsd_to_linux_fpregset() to translate from FreeBSD's struct fpreg
to struct linux_pt_fpregset. Fields are extracted from the fpr_env[]
array which stores the FXSAVE environment packed as four 64-bit words.
The FP and XMM register banks are bulk-copied as opaque byte arrays.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
Reviewed by: kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2165
(cherry picked from commit b84d31ee74535a0026ff83f2a34c07b7557f9785)
linux: Ignore sigaction(2) flags SA_UNSUPPORTED and SA_EXPOSE_TAGBITS
SA_UNSUPPORTED was introduced in Linux 5.11 to probe support
for other flags such as SA_EXPOSE_TAGBITS, introduced
at the same time. Ignore both.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
PR: 289285
Reviewed by: pouria, kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2163
(cherry picked from commit fdea83a5f63b881ade91c6cc9dfbf173137512c5)
[ELF] Fix out-of-bounds .eh_frame relocation to not overwrite the next output section (#235530)
lld/test/ELF/comdat-discarded-reloc.s intermittently fails under TSan:
OffsetGetter::get reports an error for an out-of-bounds .eh_frame
relocation and maps to output offset 0. If the link continues due to
--noinhibit-exec and .eh_frame has no pieces, the write extends past the
4-byte terminator into the next output section.
Return -1 to skip the relocation, like one in a dead piece.
Avoid the 'converted' temporaries
Apparently not necessary because the argument itself is an r-value
reference. Still dangerious because the caller does not control when the
collee moves it, but unrelated to this PR
[LoopInterchange] Add tests for loop control values in the outer preheader (NFC) (#235520)
Add test cases where it matters whether the loop control values (the
initial and final values of the IVs) are available in the outer loop
preheader. These are corner cases where the work in #235496 changes
what loop-interchange can handle.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>