[lldb] Bound DataExtractor::PeekCStr to the data it reads from (#224452)
PeekCStr only validated the first byte without checking for a terminator.
Every caller then treated the result as a C string, so an unterminated
string table let strlen run past the mapping, causing a crash or
security bug.
Return an optional StringRef, produced only when the terminator lies
within the data. The length comes along with it, so callers no longer
rescan, and an absent string stays distinct from an empty one.
ValueObject was the only caller that wanted an unterminated buffer. It
scans fixed size chunks of inferior memory, so it now asks for bytes with
PeekData and bounds its own scan.
rdar://186891223
[lldb][FreeBSDKernel] Support cross-architecture FreeBSD kernel cores (#223593)
FreeBSD's kvm_open(3) man page states that a valid resolver is required
to debug non-native kernel images as libkvm needs to map symbol names to
kernel virtual addresses. Since ProcessFreeBSDKernelCore aims to debug
kernel image and core dump from any architectures, pass a valid resolver
to kvm_open2().
Assisted-by: GPT
[lldb][FreeBSDKernel] Avoid null dereference probing FreeBSD kernels (#223590)
CheckForKernelImageAtAddress() accepts an optional read_error pointer,
but dereferenced it unconditionally in many code paths. If read_error is
null, point read_error to a dummy local variable to prevent null
dereference.
Fixes: b3cc4804d45d6b612ac9b3cc47ebbb0da44ebc60
[lldb][FreeBSDKernel] Load unrelocated FreeBSD kernel sections (#223589)
Even though displacement is zero, we need to mark the module as loaded.
Fixes: 62d06083ef186abe610de4742c62c84c2f97fcd0
[clang][bytecode] Flip a boolean flag meaning (#224649)
We only use this flag once, when passing it to
`setFoldFailureDiagnostic()` (where we invert it), so it doesn't make
sense to call it IsCCEDiag.
[Support] Only enable use of /proc/self/fd on Linux (#222497)
Only enable the use of /proc/self/fd on OSes that provide
the compatible /proc/self/fd interface.
[LFI][AArch64] Do not flush deferred LR guards on temporary labels (#224776)
In function epilogues with unwinding enabled, DWARF CFI directives
between restoring x30 and autiasp trigger
MCObjectStreamer::emitCFILabel, which emits temporary labels. onLabel
assumed all labels were branch targets and flushed DeferredLRGuard,
emitting `add x30, x27, w30, uxtw` before autiasp. Because w30
zero-extends, this stripped the PAC signature from x30 and caused PAC
exceptions on hardware with FEAT_FPAC.
Fix it by not flushing the deferred LR guard on temporary symbols in
onLabel. Also, update AArch64InstrInfo::getLFIInstSizeInBytes to return
8 for RET to fix the size assertion failure in +assertions builds, which
occurs because RET did not account for the deferred LR guard that can
precede the return instruction.
Assisted-by: Gemini
crypto(4): Crank down max number of ops to something reasonable.
Largest driver I found, qat(4), has at most 16384 sessions, so 64k
oughta be enough for anyone.
PR kern/60281: crypto(4): bugs in reference counting and test
[ORC] Drive SharedMemoryMapper via proxies (#224786)
Add a SharedMemoryMapBindings handle (SharedMemoryMap.h) and its SPS
proxy specs (SharedMemoryMapSPS.h), mirroring SimpleMemoryMap, and bind
SharedMemoryMapper to it in place of its four callSPSWrapperAsync sites.
Dispatch and callee errors now share one channel, dropping the per-call
SerializationErr handling. Updates the llvm-jitlink and clang-repl
factories and the unit test.
graphics/R-cran-Cairo: New port
R graphics device using the cairographics library for high-quality
vector (PDF, PostScript, SVG) and bitmap (PNG, JPEG, TIFF) output,
plus X11/Win32 display backends.
Reviewed by: fuz, mat (previous revision)
Differential Revision: https://reviews.freebsd.org/D22681