[mlir] Use explicit op targets for region successors (#203552)
Replace the RegionSuccessor parent sentinel with an explicit Operation *
target. Operation successors now model continuing after that operation,
while region successors continue to point at Region.
Update RegionBranchOpInterface helpers, analyses, and dialect
implementations to use operation successors. This removes the ambiguity
of interpreting parent relative to whichever operation produced the
successor when introducing early-exits.
For downstream integration for this API change:
- `successor.isParent()` -> `successor.isOperation()`
- `RegionSuccessor::parent()` -> RegionSuccessor(op)` ; that means that
you need to have access to the target op. In general it is either
`getOperation()` or `getParentOp()` (depending if you're updating a
method on the `RegionBranchOpInterface` operation or on the terminator.
Assisted-by: Codex
[flang][OpenMP] Parsing and semantics of locators as part of OmpObject
Allow function call references and reserved locator names as parts of
OmpObject. Function calls and array element accesses have the same syntax,
and the OmpObject parser will parse them as function calls. This is then
corrected (if needed) immediately after the name resolution is complete.
There are no clause-specific semantic checks of proper locators. Existing
code will check if a proper locator is specified on a clause that allows
it.
Lowering of proper locators to MLIR is not implemented, and a TODO
message is emitted.
[mlir][emitc] Support member access for values (#203308)
The `emitc.member` op is currently limited to taking lvalues of opaque
types representing structs and returning either lvalues or arrays of its
fields. Accessing members of SSA values of opaque types, therefore,
requires assigning them to an `emitc.variable`, applying `emitc.member`
to it and `emitc.load` to the member's lvalue. For users only wishing to
read members of a struct value, this should be redundant.
This PR extends `emitc.member` to handle struct values directly by
accepting opaque types as argument, as long as the result type is
neither an lvalue nor an array, which imply memory location. This
provides similar semantics to extracting elements out of SSA
tensors/vectors.
ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow
A PPTP client sending a specially crafted PPTP message with a length
smaller than the already processed fixed header can panic the system.
This resultes in a negative remaining length (a large unsigned 16-bit
number).
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
and Ke Xu from Tsinghua University using GLM-5.1 from
Z.ai
Differential Revision: https://reviews.freebsd.org/D57383
(cherry picked from commit 37e9d3641ba0e0da0d2bbaa26a59ee56a8cf3ee6)
krb5: Fix null dereference in SPNEGO token processing
krb5 1.22.1 erroneously removed a check from get_negTokenResp() for
successful decoding of the mechListMIC field. Restore the check to
prevent a null pointer dereference.
Commit message details obtained from upstream commit.
Obtained from: Upstream commit 4ae75cded
(cherry picked from commit efb5c07f91c5c11fb9bd32227ac74c2d08adf3cf)
ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow
A PPTP client sending a specially crafted PPTP message with a length
smaller than the already processed fixed header can panic the system.
This resultes in a negative remaining length (a large unsigned 16-bit
number).
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
and Ke Xu from Tsinghua University using GLM-5.1 from
Z.ai
Differential Revision: https://reviews.freebsd.org/D57383
(cherry picked from commit 37e9d3641ba0e0da0d2bbaa26a59ee56a8cf3ee6)
krb5: Fix reachable assert when importing krb5 names
If a name token contains trailing garbage, error out from
krb5_gss_import_name() instead of crashing the process with an
assertion failure.
Commit message details obtained from upstream commit.
Obtained from: upstream commit 07818f1fd
Reported by: Aisle Research (Ze Sheng, Dmitrijs Trizna,
Luigino Camastra, Guido Vranken) to krb5-bugs
MFC after: 3 days
(cherry picked from commit fce16f60de9718be6b789f00e86141a84cd920d3)
[CHERI] Add a Support utility for determining alignment requirements of CHERI capabilities. (#197402)
On CHERI systems with compressed bounds representations (which is all of
them that anyone cares about today), one of the tradeoffs to achieve
that compression is a requirement for larger allocations to be more
highly aligned. This impacts both code generation and linking in places
where globals need to be aligned and/or padded based on this
requirement. The specific alignment requirements vary by capability
format.
Co-authored-by: Alex Richardson <alexrichardson at google.com>
[AMDGPU] Track LDS DMA VGPR source reads in expert scheduling (#203292)
LDS DMA instructions are marked as VALU but we need to treat them as
FLAT instructions for expert mode waitcnt insertion. This meant we were
missing a `vm_vsrc` wait for WAR and RAW on input registers of the LDS
DMA instruction.
I added lit tests for other memory ops as well to catch future
regressions.
ntsync(9): do not double-free obj when finstall() failed
Reported by: Alex S <iwtcex at gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
[flang] Extract misparsed function reference check into function
Function calls and array element acceses have the same syntax, and some
array element accesses may be misparsed as calls. The ExprChecker will
identify and correct such cases in expressions, but they may also occur
outside of expressions (e.g. OpenMP directives and clauses).
To avoid code duplication extract the check into a new function
`IsMisparsedFunctionReference`.
[Dexter] Add condition check to state nodes
This patch enables the ability for state nodes to check conditions, meaning
they will be active only if the condition is met.
Condition evaluation is somewhat language specific; we directly check
whether the value of the evaluated expression is "true" (case-insensitive),
which works for the languages we actually use Dexter with, but may require
generalizing in future.
We also cache conditions as they are evaluated; each time we step, we clear
all cached conditions for the current frame and any expired frames, but we
keep the cached conditions for any frames rootwards from the current frame;
this prevents us from unexpectedly exiting out of a callee frame because of
debug info not surviving a stack unwind; if the early exit is desired, an
!and{at_frame_idx, condition} under the lower frame may suffice.