[CIR] Keep a region's exit in its last block when merging blocks (#243774)
`cir.br` canonicalization merges a block into its only predecessor. If
that block is the last one in its region and ends in a region exit such
as `cir.yield` or `cir.condition`, merging it into a predecessor that
does not directly precede it moves the exit out of the last block.
FlattenCFG reads the exit of `cir.scope`, `cir.if`, loop condition and
several other regions from the last block, and the `cir.await` verifier
requires it there. After `-cir-canonicalize -cir-flatten-cfg`, the
flattened function either failed to verify or silently lost the code
after the region, and a loop condition region hit an assertion in
FlattenCFG.
`BrOp::canonicalize` no longer merges the region's last block into a
predecessor that does not directly precede it when that block ends in a
region exit, so the exit keeps its position. Exit blocks elsewhere in
the region still merge, because merging them does not change which block
is last. Making every flattener search all blocks for exits would also
work. It would relax an invariant that those flatteners and the verifier
[3 lines not shown]
[llvm-readobj] Respect the exception directory when dumping ARM unwind info (#241557)
For ARM and ARM64 PE images, `llvm-readobj --unwind` decoded every
8-byte entry in each section whose name starts with .pdata. In a linked
image, however, the extent of the function table is given by the
exception directory, and the .pdata section can contain other data,
e.g. when another section is merged into it with /merge. That data was
decoded as RUNTIME_FUNCTION entries, which could lead to a fatal
".xdata must be at least 8 bytes in size" error on a valid image.
If the image has a non-empty exception directory that starts inside the
section being dumped, only decode the entries it covers. The directory
doesn't have to start at a multiple of the entry size within the section
(e.g. it can be 4-byte aligned after other merged data), so the entries
are addressed by their offset in the section rather than by an index.
Object files, and images without such a directory, are handled as
before.
The x86-64 dumper (Win64EHDumper) also walks .pdata without consulting
[4 lines not shown]
lang/clx: Update to 0.5.0
Install clx's headers under include/clx. Its lua.h, lauxlib.h and
lualib.h rename the Lua C API to clx_lua_*, so they must not shadow a
real Lua's headers in ${PREFIX}/include. The compiler driver picks up
the new include directory from CMAKE_INSTALL_INCLUDEDIR.
[lldb] Fix ambiguous ProtocolDescriptor in the MCP unit tests under C++20 (#237270)
When building as C++20, lldb/Host/JSONTransport.h declares the concept
lldb_private::transport::ProtocolDescriptor. MCPClientTest.cpp and
ProtocolMCPServerTest.cpp have using-directives for both that namespace
and lldb_protocol::mcp, so an unqualified ProtocolDescriptor is
ambiguous between the concept and
lldb_protocol::mcp::ProtocolDescriptor, and the tests fail to compile.
Qualify the six uses, as ProtocolMCPServerTest.cpp already does
elsewhere. No change under C++17.
assisted with: claude
www/freenginx: Fix excessive CPU usage with TLS 1.3 early data
The fork carries the same write filter code as nginx, so a client can keep
a worker process spinning on a send that never makes progress when
"ssl_early_data" is enabled. Upstream has not released a fix.
Security: cee7773d-e7dd-11f1-9b74-3497f65b111b
With hat: ports-secteam
Sponsored by: Netzkommune GmbH
www/nginx-devel: Security update to 1.31.10
A client can keep a worker process spinning on a send that never makes
progress when "ssl_early_data" is enabled.
Changelog: https://nginx.org/en/CHANGES
Security: cee7773d-e7dd-11f1-9b74-3497f65b111b
With hat: ports-secteam
Sponsored by: Netzkommune GmbH
www/nginx: Security update to 1.30.8
A client can keep a worker process spinning on a send that never makes
progress when "ssl_early_data" is enabled.
Changelog: https://nginx.org/en/CHANGES-1.30
Security: cee7773d-e7dd-11f1-9b74-3497f65b111b
With hat: ports-secteam
Sponsored by: Netzkommune GmbH
[analyzer] Make symbol iteration cheaper (#244865)
SymExpr::symbols() returned an llvm::iterator_range, which stores both
iterators, and each iterator owned a SmallVector worklist, so every
range-for copied worklists. The iterator operations were also out of
line, and comparing against the end iterator compared whole worklists.
Return a symbol_range that owns the worklist instead, and make the
iterator a pointer to it. The range is neither copyable nor movable, and
begin() is lifetimebound, so -Wdangling catches iterators that outlive a
temporary range. The iterators are single-pass and only meant to be
compared against end(). Also make the iterator operations inline and
skip expand() for SymbolData, which has no operands.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 3.9-5.1% and the
cycles by 2.8-4.4%. Peak memory is unchanged, and so are the analyzer
statistics and diagnostics.
[5 lines not shown]
[analyzer] Avoid rebuilding AST matchers for every function (#244843)
NumberObjectConversionChecker built its whole AST matcher tree,
including a regex for matchesName, for every analyzed function body. The
matcher does not depend on the function or on the Pedantic option, so
build it once when the checker is constructed.
ObjCAutoreleaseWriteChecker and RunLoopAutoreleaseLeakChecker built and
ran Objective-C only matchers (they require Objective-C object pointer
types, message sends or @autoreleasepool) on every function body, even
in non-Objective-C translation units. Skip them when the language is not
Objective-C.
On some LLVM TUs (GVN, LiveVariables, RegionStore, SemaExpr) this
reduces the instructions of the static analyzer by 0.9-5.1% and the
cycles by 1.0-4.6% on darwin, where these checkers are enabled by
default. Peak memory is unchanged. The diagnostics are unchanged.
Assisted-by: Claude Opus 5.5
[3 lines not shown]
[llvm-objcopy][MachO] Don't create a second LC_SEGMENT in object files (#238352)
In Mach-O object files (MH_OBJECT), all sections from all segments are
stored in a single LC_SEGMENT/LC_SEGMENT_64 load command. Each section
header stores its own segment name, which the linker uses to place the
section. The load command name is normally empty, but this change does
not depend on it.
Source: [Mach-O Runtime Architecture, page
57](https://math-atlas.sourceforge.net/devel/assembly/MachORuntime.pdf).
`--add-section __FOO,__bar` looked for a load command named `__FOO`, did
not find one and added a second LC_SEGMENT to the object file, which
Apple's ld-classic rejects with error: more than one LC_SEGMENT found in
object file. For object files, add the new section to the existing load
command and keep `__FOO` as the segment name in its section header.
Similar issue with --update-section #127604
Fixes #238320
[3 lines not shown]