Attributor: Don't keep a reference into the function information map (#240717)
getFunctionInfo kept a reference to the map entry while initializing the
information, which can add other functions to the map. If that grows the
map, the reference dangles and the function information is read from
freed memory.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
nvmecontrol: Range-check the format command's field values
The format command accepted any 32-bit value for -m, -p, -l and
--ses and passed it into the Format NVM command. Before
eae727676169 an out-of-range value spilled into the adjacent cdw10
fields, which usually drew an error from the controller; after it,
the value is masked to the field width, so a mistyped value is
silently accepted with a different meaning. Most seriously,
--ses 8 masked to SES=0 and performed a plain format with no erase
at all, exiting 0. A value like --ses 10 masked to a cryptographic
erase while bypassing the FNA cryptographic erase capability check,
which compares the unmasked value.
Reject values outside the ranges nvmecontrol.8 documents, which are
the values the spec defines: 0-1 for -m and -l, 0-3 for -p, and
0-2 for --ses. The checks run at option validation time, before
the device is opened, and the capability check now only ever sees
valid values.
[10 lines not shown]
TableGen: Error on allocatable register classes with an empty allocation order
A register can never be allocated from a class with an empty
allocation order. This can happen when an alternative order excludes
every member, or when an inferred class inherits such an order from
its super class.
Classes with no members are exempt, since AMDGPU's VReg_1 is a verfy
hacky, intentionally empty allocatable class.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CI: Add AlmaLinux 10 x86-64-v2 package build
EL10 is built for x86-64-v3 CPUs, so the packages built on AlmaLinux 10
cannot be installed on its x86-64-v2 variant. Add an almalinux10-v2
job to the package workflow that builds on the x86_64_v2 cloud image,
and store its RPMs in a separate x86_64_v2 directory so they do not
collide with the regular EL10 packages.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: FingerlessGlov3s <me at fingerlessgloves.me>
Closes #19811
Fix TrueSearch times, service gates and system dataset handling
truesearch.query:
- A stat time that datetime cannot hold, such as a year after 9999,
is null. One such file no longer fails the query. A time is not
rounded into the next second.
- A list of the indexed datasets that was read across a configure or
a mount serves one query and is not kept.
- "/mnt/" is refused, as "/mnt" is.
- A recursive query as a user skips a directory that is gone. A user
who cannot reach the path gets a CallError with EACCES.
- A date filter gives a year of four digits. A date outside the years
1 to 9999 in UTC is a validation error.
- The method docstring no longer describes parameters. The username
field says that the user must be able to access path.
The service:
- configure() logs a start, restart, reload or stop that systemd
reports failed. It then does not wait for released datasets. It
[19 lines not shown]
[libc][docs] Add types and globals tables to C23 docgen pages (#240989)
Header status pages currently track only functions and macros, leaving
out required standard types, global variables, and newer POSIX.1-2024
additions on the C23 headers.
Check header-scoped type and global variable implementations in docgen,
render Types and Global Variables tables when present, and populate the
18 existing C23 header YAML catalogues with their standard types,
globals, and missing C23 and POSIX.1-2024 symbols.
Assisted-by: Automated tooling, human reviewed.
[GlobalDCE] only mark a virtual function as live when its vtable is live (#232495)
Previously, when using virtual function elimination, a virtual call
would mark all implementations of that virtual function as live, even if
their vtable was never actually used. This can happen in C++, but is
much more common in Rust.
The change here is to only keep the implementation if:
1. there is a virtual call to the function
2. the vtable of the implementation is live
This change has knock-on effects where potentially there is now only one
vtable in a typeid and hence calls can be devirtualized. It also in
general helps with code size of course.
The gist of the change is that we store virtual functions (and their
caller) into a separate work list. Then in
`ScanTypeCheckedLoadIntrinsics` we only mark a virtual function as live
[22 lines not shown]
ARM: Define the R12 register class explicitly
TableGen inferred the R12-only class from hGPR and tcGPR, and it
inherited the Thumb1 allocation order of tcGPR, which only has low
registers. On Thumb1 the class had no allocatable registers, so an
inline asm input tied to r12 failed to allocate. In the future
TableGen should error on allocatable classes without any members.
Define the class explicitly so R12 is in its allocation order. This
fixes a regression from #238705, which started creating tied inline
asm inputs in this class.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[OpenACC] NYI complex multiply reductions in recipe materialization (#240921)
A reduction whose operator is mul and whose type contains a complex
element cannot be lowered by reducing the real and imaginary parts
independently, because multiplication mixes the two components. Emit a
not-yet-implemented diagnostic when acc-recipe-materialization
materializes such a recipe, instead of producing silent wrong answers
downstream.
Attributor: Only look up the associated function of function interfaces
isValidIRPositionForUpdate only needs the associated function of
function interface positions, but computed it for every position,
which for call site positions looks for callback arguments.
attributor-light is up to 1.1% faster (callgrind).
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[LTO] Fix order dependence in the escaped-symbol IR name mismatch check (#240648)
LTO::addModuleToGlobalRes marks a symbol external when two copies of it
have different IR names, such as @"\01_foo" and @foo on Mach-O, which
name the same symbol but are separate IR globals (#57864). The check
compared against GlobalRes.IRName after the prevailing copy had already
replaced it with its own IR name, so it only caught the mismatch when
the prevailing definition was added before the differently named
reference. With the reference first, the definition could be
internalized and deleted as dead, leaving the reference undefined at
link time.
I came across this while working on a fix for Clang when you have an asm
label "_foo" and then a global "foo" and they don't lower to a single IR
symbol (the former gets "@_foo" and the latter "foo") but they do lower
to the same object symbol. This breaks things like linkonce odr
handling, internalizing, etc. I'm working on a Clang fix for this as
well (since this LTO fix won't address the single file case)
[AMDGPU] Price misaligned flat and LDS accesses with the LDS misaligned bug
In WGP mode on subtargets with the LDS misaligned bug, a flat access is
split into pieces no wider than its alignment and no narrower than 4
bytes, and an LDS access aligned below 4 bytes uses 8-byte pieces as one
aligned to 4 does.
[AMDGPU] Price buffer fat pointer memory operations
Price buffer fat pointer accesses as global accesses, except that an
aligned load is not widened and a vector of odd width elements is not
split element by element. Without relaxed buffer bounds checking, a
vector of elements that are a multiple of 32 bits wide is accessed in
pieces no wider than its alignment and no narrower than 4 bytes, and a
vector of other byte-sized or power of 2 wide elements in pieces of the
largest power of 2 bytes that divides the element size. The width comes
from buffer fat pointer lowering, which now exposes it. When the pointer
is a buffer resource plus a constant offset, the offset and a constant
number of records give the same bounds facts lowering uses to access it
in wider pieces.
[OpenMP][OMPIRBuilder] Propagate custom mapper errors from createTarget
When a custom mapper callback failed while emitting the kernel launch of a
target region, emitTargetCall wrapped the error in cantFail and crashed,
although createTarget already reports errors to its caller. MLIR
translation hits this when an omp.target uses a declare mapper that it
cannot translate yet, such as one with iterator map entries, while
omp.target_data reports the same mapper as not yet implemented.
Return the error from emitTargetCall and pass it on from createTarget, so
callers report it instead of crashing. When emitIfClause stops on such an
error, it now inserts the blocks it has not emitted yet into the function,
so they are not leaked.
Assisted with Claude Opus 5.5.