Reland "[IR] Use persistent metadata IDs for printing" (#220390)
This relands 85e903099313aa5ea98d175698aaa40e27a0d743 with fixes for
the buildbot failures that prompted its revert.
Move the MachineModuleSlotTracker debug-location query out of line so
DILocation is complete when SmallPtrSet pointer traits are instantiated
by MSVC.
The legacy DXIL pretty-printer renumbers persistent metadata IDs, which
changes module print state. Make the pass report the modification and
register it as a transformation rather than an analysis.
Repeated pass and debug printing currently rebuilds metadata slot
numbers by scanning the module. On large modules, this repeated setup
can take more time than printing the requested function.
Store a persistent print ID in each metadata node and use that ID
whenever metadata is printed. Before final assembly output, renumber the
[9 lines not shown]
oci: Install FreeBSD-pam in the runtime image
In 16.0/15.1, the PAM modules were split from FreeBSD-runtime into a
new FreeBSD-pam package. FreeBSD-runtime does not install FreeBSD-pam,
which means if a user starts from runtime, then installs sshd, sshd will
fail to authenticate users because of missing PAM modules.
Since FreeBSD-pam is relatively small (about 230kB on amd64), and is
already part of FreeBSD-set-minimal, add it to the runtime image as
well. Users who absolutely don't want this can still build their
own images without it.
MFC after: 1 week
Reviewed by: dfr
Reported by: Michael Johnson <ahze at ahze.net>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59194
[CIR][NFC] Add a declared-extent example and restore max_element
The filter needs stateless functors rather than lambdas, since max_element
assigns its iterator and a C++17 lambda has no copy assignment.
Assisted-by: Cursor / claude-opus-5
[AArch64] Fix widening of half/bfloat partial reductions. (#220261)
Includes testing aimed at letting us use partial reductions as the
default for add/fadd reductions when ordering isn't required.
AMDGPU: Fix LDS bank count for gfx704 and gfx950
Both inherited a bank count that does not match the hardware: Bonaire
has 16 banks, and gfx950 doubled the count to 64 along with its larger
LDS. The ROCm device metadata has reported these values all along, so
the subtarget and the TargetParser table were the outliers.
Moving the count out of FeatureISAVersion9_4_Common is required because
the emitter rejects a GPU whose feature closure sets a field twice.
Change-Id: I9b6fb9edafbf3f2c5eb834308cc8388604382160
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
[libc] Stop printing \0 in stdio/fputc_test.cpp (#220544)
This test defines two strings in the form of constant char[] arrays, and
then loops over the characters of each one using a range-for. This
iteration includes the implicit terminating \0, which is printed to the
output channels along with everything else. This is mildly inconvenient
because the presence of a \0 in a log file causes standard tools like
`grep` and `less` to default to treating it as binary.
Now each loop breaks before printing the NUL, so the characters sent to
the output streams are exactly the same as in fputs_test.cpp.
Also, while I was here, I moved the check of fputc's return value into
the loop, so that it's checked on every iteration instead of just the
final one, matching the other loop checking putchar. (Surely this was
intended all along; there was no comment explaining the difference.)
www/freenginx-devel: third-party modules management
- njs module security update to 1.0.1
Bump PORTREVISION.
Sponsored by: tipi.work
<ChangeLog>
nginx modules:
*) Security: fixed an access control bypass in js_access when an
asynchronous request body continuation threw an exception or
produced an unhandled rejection. Previously, nginx could continue
processing the request as though the js_access check had succeeded.
Thanks to Ta Duc Thien.
*) Security: fixed a worker process crash when reading
[48 lines not shown]
NAS-142731 / 26.0.0-RC.1 / Fix bond transmit hash policy never reaching the kernel (by Qubad786) (#19594)
## Problem
The stored hash policy string was translated into the `truenas_pynetif`
enum by member-name lookup. The stored values are `layer2`, `layer2+3`
and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and
`LAYER34` — `+` cannot appear in a Python identifier, so two of the
three resolved to `None`, and `getattr`'s default swallowed the miss
with no log or exception. The netlink attribute was then never packed
and the kernel silently kept its default `layer2`, so outbound traffic
could not spread across bond members. Every LACP/LOADBALANCE bond
defaults to `layer2+3`, so this was not limited to people who picked a
policy explicitly. `lacpdu_rate` goes through the identical construct
and only works because `SLOW` and `FAST` happen to be valid identifiers.
## Solution
Map the choice enums to library members explicitly, behind two helpers
that take the stored string and return an enum or `None`. Dict literals
rather than a name lookup, so a rename on the library side becomes a
[4 lines not shown]
NAS-142731 / 26.0.0 / Fix bond transmit hash policy never reaching the kernel (by Qubad786) (#19593)
## Problem
The stored hash policy string was translated into the `truenas_pynetif`
enum by member-name lookup. The stored values are `layer2`, `layer2+3`
and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and
`LAYER34` — `+` cannot appear in a Python identifier, so two of the
three resolved to `None`, and `getattr`'s default swallowed the miss
with no log or exception. The netlink attribute was then never packed
and the kernel silently kept its default `layer2`, so outbound traffic
could not spread across bond members. Every LACP/LOADBALANCE bond
defaults to `layer2+3`, so this was not limited to people who picked a
policy explicitly. `lacpdu_rate` goes through the identical construct
and only works because `SLOW` and `FAST` happen to be valid identifiers.
## Solution
Map the choice enums to library members explicitly, behind two helpers
that take the stored string and return an enum or `None`. Dict literals
rather than a name lookup, so a rename on the library side becomes a
[4 lines not shown]
Fix bond transmit hash policy never reaching the kernel
## Problem
The stored hash policy string was translated into the `truenas_pynetif` enum by member-name lookup. The stored values are `layer2`, `layer2+3` and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and `LAYER34` — `+` cannot appear in a Python identifier, so two of the three resolved to `None`, and `getattr`'s default swallowed the miss with no log or exception. The netlink attribute was then never packed and the kernel silently kept its default `layer2`, so outbound traffic could not spread across bond members. Every LACP/LOADBALANCE bond defaults to `layer2+3`, so this was not limited to people who picked a policy explicitly. `lacpdu_rate` goes through the identical construct and only works because `SLOW` and `FAST` happen to be valid identifiers.
## Solution
Resolve the library member by name through the existing choice enums, whose member names already line up: `XmitHashChoices.LAYER23` carries the value `LAYER2+3` and matches `BondXmitHashPolicy.LAYER23`. An unmappable value now raises rather than quietly becoming `None`.
The call sites catch that and log the offending value instead of letting it propagate, because `configure_bonds_impl` swallows per-bond exceptions — raising here would abandon the bond before its members are enslaved and its MTU is set, turning a degraded network into an absent one on the boot path.
(cherry picked from commit 72ff889f1943261945ada456bc6d27ed1f1416ce)
Fix bond transmit hash policy never reaching the kernel
## Problem
The stored hash policy string was translated into the `truenas_pynetif` enum by member-name lookup. The stored values are `layer2`, `layer2+3` and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and `LAYER34` — `+` cannot appear in a Python identifier, so two of the three resolved to `None`, and `getattr`'s default swallowed the miss with no log or exception. The netlink attribute was then never packed and the kernel silently kept its default `layer2`, so outbound traffic could not spread across bond members. Every LACP/LOADBALANCE bond defaults to `layer2+3`, so this was not limited to people who picked a policy explicitly. `lacpdu_rate` goes through the identical construct and only works because `SLOW` and `FAST` happen to be valid identifiers.
## Solution
Resolve the library member by name through the existing choice enums, whose member names already line up: `XmitHashChoices.LAYER23` carries the value `LAYER2+3` and matches `BondXmitHashPolicy.LAYER23`. An unmappable value now raises rather than quietly becoming `None`.
The call sites catch that and log the offending value instead of letting it propagate, because `configure_bonds_impl` swallows per-bond exceptions — raising here would abandon the bond before its members are enslaved and its MTU is set, turning a degraded network into an absent one on the boot path.
(cherry picked from commit 72ff889f1943261945ada456bc6d27ed1f1416ce)
NAS-142731 / 27.0.0-BETA.1 / Fix bond transmit hash policy never reaching the kernel (#19586)
## Problem
The stored hash policy string was translated into the `truenas_pynetif`
enum by member-name lookup. The stored values are `layer2`, `layer2+3`
and `layer3+4`, while the enum members are `LAYER2`, `LAYER23` and
`LAYER34` — `+` cannot appear in a Python identifier, so two of the
three resolved to `None`, and `getattr`'s default swallowed the miss
with no log or exception. The netlink attribute was then never packed
and the kernel silently kept its default `layer2`, so outbound traffic
could not spread across bond members. Every LACP/LOADBALANCE bond
defaults to `layer2+3`, so this was not limited to people who picked a
policy explicitly. `lacpdu_rate` goes through the identical construct
and only works because `SLOW` and `FAST` happen to be valid identifiers.
## Solution
Map the choice enums to library members explicitly, behind two helpers
that take the stored string and return an enum or `None`. Dict literals
rather than a name lookup, so a rename on the library side becomes a
static attribute error at import time instead of another silent `None`.
[Clang] Use Compat diagnostics for most extension/compatibility warnings (#216693)
This changes the wording of a few diagnostic messages to be more
canonical. Otherwise this should be NFC.
[lldb-server] Add dynamic loader support to accelerator plugin protocol (#214564)
Context:
https://discourse.llvm.org/t/upstreaming-basic-support-for-accelerators/89827/
This is PR#1 of a PR stack adding dynamic loader support for accelerator
(GPU) targets to lldb:
the next PR is **#214581**
In this PR we are adding the protocol foundation for the dyld
- Added handling of new GDB Remote packet
`jAcceleratorPluginGetDynamicLoaderLibraryInfo` and testing it with the
Mock Server Plugin
- see the dyld implementation in **#217393**
clang/AMDGPU: Fix test to work with -lgomp (#220331)
Recently added test fails with "error: '-fopenmp-targets' must be used
in conjunction with a '-fopenmp' option compatible with offloading;
e.g., '-fopenmp=libomp' or '-fopenmp=libiomp5'" if it is built with
-lgomp. This adds a default value (libomp) for the -fopenmp flag to
prevent this test failure.
(The test was added as part of
https://github.com/llvm/llvm-project/pull/219963)
[mlir] Remove unnecessary allow-unregistered-dialect flags (#220613)
This is bad practice, instead use unknown operations in the test dialect
when tests only need placeholders.
Use a registered SPIR-V operation for translation diagnostics.
Assisted-by: Codex