[lldb] Guard against null dereference in GetCppObjectPointer (#215710)
ClangUserExpression::GetCppObjectPointer dereferenced the ValueObjectSP
returned by GetObjectPointerValueObject before checking it for null. Fix
by moving the existing check above the child lookups.
[Offload] Keep empty COFF offload entry ranges alive (#215390)
A Windows offload link can have no real offload entries. One example is
a HIP program, or a HIP-related host-only object, built with RDC
but with no kernels or registered device globals. The wrapper still
emits registration code that refers to the offload entry range.
On COFF this range is built from ordered sections. Empty start and stop
sections let `lld-link /opt:ref` discard them. The registration code
then has relocations against discarded `__start_llvm_offload_entries`
and `__stop_llvm_offload_entries` symbols, and the link fails.
Linux avoids this through the ELF section-retention path. The wrapper
emits a dummy `llvm_offload_entries` section entry and places it in
`llvm.used`, which gives the section a retain flag in the ELF object.
That keeps the section alive under `--gc-sections`, so the linker can
still synthesize the `__start` and `__stop` symbols.
The same fix does not map to COFF. COFF does not use ELF-style
[20 lines not shown]
[lldb] Change the Symbol rep for re-export symbols (#213356)
On Darwin system, we have re-export symbols. A library can have a symbol
table entry for function A() that is a re-export symbol; it's only data
is the name of the actual function to call, B(). When code calls A(),
the dynamic loader will resolve this to B() in some other library.
Previously, Symbol was using its AddressRange's Address object's offset
field to point to lldb memory where the name of the target function,
B(), was stored in the binary symbol table. In December Alex put up a PR
to stop abusing the Address object in this way, and store (1) the name
of the target function, and (2) once it has been looked up, the name of
the target function's library.
https://github.com/llvm/llvm-project/pull/172565
Alex originally added a ConstString target_name, FileSpec solib to
Symbol, which increased the size of this object, and lldb stores many of
them, so this was a problem.
[14 lines not shown]
[MachineModuleInfo] add a grouping mechanism to defer deletion MF (#214525)
Add a mechanism so that We can defer deleting the MF after a function is
finalized because there are cases in which we want to late-inline those
MF into some caller.
commit-id:d24afd34
revert 'drm/amd/display: Fix backlight max_brightness to match exported range'
jmc@ reports this 6.18.42 change caused a very dim display on boot and with
display.brightness values of 97-100 on a Dell Inspiron 5505
it looks like this patch will be reverted in linux stable branches
https://gitlab.freedesktop.org/drm/amd/-/work_items/5562
graphics/mesa-devel: unbreak build on aarch64 after cde5539d63d4
In file included from ../src/panfrost/perf/pan_perf.c:15:
../src/panfrost/perf/pan_perf.h:51:11: error: use of undeclared identifier 'CLOCK_MONOTONIC_RAW'
51 | return CLOCK_MONOTONIC_RAW;
| ^
Reported by: pkg-fallout
[ADT][ProfileData] Introduce SortedVectorMap and switch CallTargetMap to it (#215733)
This patch introduces SortedVectorMap, a map implementation backed by
a sorted SmallVector, and switches SampleRecord::CallTargetMap from
DenseMap<FunctionId, uint64_t> to
SortedVectorMap<FunctionId, uint64_t, 0>.
Commit 3746f3e4d612 previously changed CallTargetMap from
std::unordered_map<FunctionId, uint64_t> to DenseMap. However, greater
than 97% of CallTargetMap instances have no more than one
element. When storing a single callee, the DenseMap incurs over 60x
memory overhead compared to a single std::pair<FunctionId, uint64_t>
(allocating a 64-bucket table and bit vector of ~1.5 KB vs 24
bytes). Since we instantiate CallTargetMap for every call site, this
~1.5 KB table floor per record adds up to gigabytes of wasted heap
memory across a large profile.
SortedVectorMap keeps key-value pairs in contiguous memory ordered by
key and uses std::lower_bound for lookups. Configuring N = 0 inline
[20 lines not shown]
[CIR] Use CIR integer type for EH personality function signature (#215901)
We had previously been using the MLIR builtin i32 type as the return
type when creating the declaration for exception handling personality
functions. This caused the calling convention lowering to fail because
it wasn't expecting non-CIR types in a CIR function.
This change updates the code that builds the declaration to use the CIR
s32 type. Multiple tests that had been disabling calling convention
lowering because of the above problem can now leave it enabled.
crypto/openssl: correct version numbers for pkg-config files
The files were incorrectly reporting 3.5.1 instead of 3.0.21.
This is a direct commit to stable/14 as stable/15 and later are on
OpenSSL 3.5.
Approved by: re (cperciva)
PR: 297144
Fixes: d03be8cf ("crypto/openssl: make vendor imports easier/less error prone")
(cherry picked from commit 2e04d98688230fecce228b4d32e1bbf7da6ef508)
sys/socket.h: Fix AF_MAX
AF_MAX was always intended to be one more than the greatest allocated
value. Jeff broke this in 2013. Unfortunately, a bunch of people then
decided to adapt to the mistake instead of correcting it.
Approved by: re (cperciva)
Fixes: 863c7e45628d (" - Reserve a special AF for SDP. The one we were incorrectly using before was taken by another AF.")
MFC after: 3 days
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kevans, glebius
Differential Revision: https://reviews.freebsd.org/D58597
(cherry picked from commit ddd850aa7720f77b6605599655df898b16ed74cc)
(cherry picked from commit 2d252764711bebe09970507a30dff0f7641c6e0c)