[RISCV] NFC: Use the new "let append" TableGen feature to reduce duplication (#198761)
llvm#182382 introduced a language extension to accumulate field values:
“append” concatenates the new value after the current value, whilst
"prepend" concatenates before the existing value. This change uses that
feature to eliminate repetition in the definition of some of the
compressed instructions.
For example, line 267 of RISCVIntrInfoC.td establishes a scope for “`let
Predicates = [HasStdExtZca] in {`”; this scope ends on line 515.
Meanwhile, line 454 wants to add the `IsRV64` predicate for a single
instruction but was forced to duplicate the previous condition as well:
“`let Predicates = [HasStdExtZca, IsRV64] in`”. That’s no longer
necessary since the addition can now be explicit: “`let append
Predicates = [IsRV64] in `”
I‘ve verified that this change has no effect on the TableGen output.
It seems quite likely that this same change could be made in some of the
other RISC-V TableGen source files…
[libc][nfc] Include header for EFIAPI macro (#198876)
This file uses `EFIAPI`, but it's not included. It looks like
compilation currently succeeds because `EFI_SYSTEM_TABLE.h` is the only
header that includes `EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.h`, and it happens
to include `EFIAPI-macros.h` indirectly.
We will be adding Bazel rules for this file, and Bazel typically
requires all headers to be compilable on their own. This build error is
theoretically reproducable by running cmake build with
`-DCMAKE_VERIFY_INTERFACE_HEADER_SETS` if we had the appropriate
FILE_SETs defined.
games/open-adventure: upgrade to version 1.21
Changes relative to the previous port version 1.16:
* Saying Z’ZZZ at reservoir no longer causes the waters to part
and crash.
* Man-page has been brought up-to-date.
* Ensure that the KNIVES_VANISH message can’t issue twice.
* Make oldstyle correctly suppress line editing.
* Code-hardening and spell-checking of texts.
[lldb/Interpreter] Plumb ScriptedMetadata through scripted plugin CreatePluginObject (NFC) (#198425)
Replace the (class_name, args_sp) parameter pair on CreatePluginObject
across the scripted plugin interfaces (ScriptedThread, OperatingSystem,
ScriptedBreakpoint, ScriptedFrameProvider, ScriptedProcess, and the
underlying ScriptedPythonInterface template) with a single `const
ScriptedMetadata &`. Callers (OperatingSystemPython, ScriptedThread,
ScriptedProcess, BreakpointResolverScripted, ScriptedFrameProvider) pass
their existing ScriptedMetadata directly, removing the need to re-bundle
class_name and args at every call site.
ScriptedBreakpoint, ScriptedFrameProvider and ScriptedProcess no longer
carry a redundant `args_sp` parameter; their callers fold those args
into the metadata, and the Python overrides reconstruct a
StructuredDataImpl from the metadata's args dict for the dispatched
call.
ScriptedInterface gains an `m_scripted_metadata` member and a
`GetScriptedMetadata()` accessor; ScriptedPythonInterface populates it
[6 lines not shown]
[SSAF][WPA] Bounds propagation graph is a supergraph of the pointer-flow graph
Background: The whole-program UnsafeBufferReachableAnalysis propagates bounds
between pointers. It uses the pointer-flow graph extracted and linked
from translation units.
This commit patches the gap between the semantics of bounds
propagation and pointer-flow: the bounds propagation graph is a
supergraph of the pointer-flow graph in that a pointer-flow graph edge
(src, i) -> (dst, j) is the projection of a finite set of bounds
propagation graph edges {(src, i+d) -> (dst, j+d) | 0 <= d < UB} for a
small constant upper bound UB. See the following example for the idea:
```
void f(int ***p, int **q) {
*p = q;
(**p)[5] = 0;
}
```
[7 lines not shown]
[CIR] Handle atomic-fetch lowering of pointer types. (#198871)
We previously didn't properly handle the pointer type conversions, which
resulted in a verifier error. This patch does what classic codegen does
for these: casts them to an integer type. The rest of the logic around
this in classic codegen isn't necessary as the llvm intrinsics now
handle those types properly.
[CIR] Fix bugs with array new in a ternary expression (#198869)
While attempting to compile Clang with CIR enabled, we ran into a
problem with the cleanup handling for array new inside of a ternary
operation. The reduced test case ended up showing different failure
modes with and without exceptions enabled, but it failed in both cases.
With exceptions enabled, we were failing to spill the value to be
returned and reload it outside of the cleanup scope. With exceptions
disabled, we were pushing an effectively empty entry on the EH stack and
later asserting when trying to pop it.
This change fixes the spill and reload problem by inserting a
RunCleanupsScope RAII object around the ternary branch generation code
with a call to forceCleanups to generate the spill and reload.
The assertion failure is fixed by replacing the assert call with code to
safely handle the condition of having an empty cleanup on the EH stack.
We should probably modify the code that pushes EH-only cleanups to avoid
doing so when exceptions are disabled, but that's a more extensive
[7 lines not shown]
[VPlan] Add type in VPRecipeValue, migrate first set of recipes. (NFC) (#195485)
This patch adds a new Type field to hold the scalar type for the
VPRecipeValue. It starts the migration of an initial set of recipes to
set the scalar type and use it directly in VPTypeAnalysis, removing
special handling for those types.
Eventually, VPTypeAnalysis can be retired when the migration is
complete, hopefully eliminating the need for type related caching, which
can lead to subtle invalidation errors.
To help the transition, a temporary getScalarTypeOrInfer has been added,
which returns the scalar type set in the VPValue for already migrated
recipes or falls back o type inferrence otherwise.
VPlanVerifier has been extended verify the set scalar type where
possible.
Tracking the type directly means a few places that change the type will
[5 lines not shown]
[Offload] Make profiling support opt-in on events (#198810)
Summary:
Profiling requires getting time stamp information, which required
actually materializing barriers on the event. This caused performance
regressions in some OpenMP applications. Instead, we want to make this
opt in. This just adds a new argument to `olCreateEvent` which takes
some flags. Right now this is just none and profiling. Pretty mechanical
beyond that. Should revert this to the old behavior for OpenMP.
Co-authored-by: Kevin Sala Penades <kevinsala.ks at gmail.com>
[libc++] Require the exact assignment expression to be trivial in __uninitialized_allocator_copy_impl (#196648)
Fixes https://github.com/llvm/llvm-project/issues/196645
`__uninitialized_allocator_copy_impl` has an optimization that replaces
`allocator_traits::construct` with `std::copy` for raw pointer ranges
when the element type is trivially copy constructible and trivially copy
assignable.
The copy-assignment trait only checks whether assignment from `const T&`
is trivial. That is weaker than the expression used by `std::copy`,
which evaluates `*out = *in`. If overload resolution selects a different
non-trivial assignment operator for that expression, `std::copy` can
call that operator on uninitialized storage.
Check `is_trivially_assignable<_Out&, _In&>` instead. This matches the
assignment expression used by `std::copy`, preserves the optimized path
when that assignment is actually trivial, and avoids making non-const
raw pointer callers select the generic `allocator_traits::construct`
[4 lines not shown]
[flang][PPC] Improve vector type names in expression diagnostics (NFC) (#197821)
Improve Flang semantic diagnostics for vector types by printing vector
type spellings in Fortran syntax instead of internal builtin-derived
type names.
Use `DerivedTypeSpec::VectorTypeAsFortran()` when producing vector
operand type names in `ArgumentAnalyzer::TypeAsFortran()`, instead of
relying on the generic type formatting path.
This updates diagnostics to print vector types as Fortran source-like
spellings, such as:
- `vector(integer(4))`
- `vector(real(4))`
while preserving the existing formatting for non-vector derived types.
bsdconfig: Make sure that SSID names are properly escaped
The f_menu_wpa_scan_results() function returns a list of networks
discovered by a scan. The untrusted network names are evaluated in
f_dialog_menu_wireless_edit. The quoting applied in
f_menu_wpa_scan_results() protects against evaluation of something like
"$(whoami)" but one can add single quotes to defeat that.
Pass the SSID names through f_shell_escape to work around this. Escape
single quotes in f_dialog_wireless_edit() and f_menu_wireless_configs()
too for consistency.
I note that this module doesn't seem to actually work, see e.g.,
bugzilla PR 229883.
Approved by: so
Security: FreeBSD-SA-26:23.bsdinstall
Security: CVE-2026-45255
Reported by: Austin Ralls
[2 lines not shown]
libcasper: switch from select(2) to poll(2)
The previous implementation used FD_SET() on a stack-allocated fd_set,
which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE
(1024).
poll(2) takes an array indexed by slot rather than by fd value, so it
has no FD_SETSIZE limit.
Approved by: so
Security: FreeBSD-SA-26:22.libcasper
Security: CVE-2026-39461
Reported by: Joshua Rogers
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D56695
fusefs: Handle buggy servers' LISTXATTR response
The fuse protocol requires server to respond to LISTXATTR with a
NUL-terminated string. If they don't, report an error rather than
attempt to scan through uninitialized memory for a NUL.
Approved by: so
Security: FreeBSD-SA-26:20.fusefs
Security: CVE-2026-45252
admbugs: 1039
Reported by: Joshua Rogers
Sponsored by: ConnectWise