[lit] Run builtin cat / diff in-process instead of spawning (#208024)
cat and diff are the only two builtins that still spawn a subprocess:
every cat/diff on a RUN line spawns a fresh Python interpreter, which
dominates wall time given how small lit's typical inputs are. Run them
in-process instead.
The spawned-script path stays as a fallback for now. Removing it
entirely is a follow-up PR. Output is byte-identical to the spawn path
either way.
[OpenMP][Clang] Enable `ATTACH`-style maps for mappers. (#210213)
This is a follow-up to #153683 to support OpenMP compliant
pointer-attachment
in `declare_mappers` via `ATTACH`-style maps.
In addition to enabling attach-style maps, we also need to propagate
information about
which map entries are for "pointee" data, i.e. have an "attach-ptr", and
thus occupy a different storage block than the base variable for which
the mapper is being generated. e.g.
```c
S sa[10];
#pragma omp declare_mapper (default: S s) map (s.x, s.p[0:10])
#pragma omp target_enter_data map(sa)
```
[18 lines not shown]
Update to 0.788
Upstream changes:
0.788 (07.17.2026) - John Siracusa <siracusa at gmail.com>
* Fixed a bug in refine_dbi_foreign_key_info. (Patch by Bernd Bleßmann)
0.787 (05.04.2026) - John Siracusa <siracusa at gmail.com>
* Adjusted MySQL column auto-generation to better handle the
explicit_defaults_for_timestamp server setting.
0.786 (08.20.2024) - John Siracusa <siracusa at gmail.com>
* Fixed a bug that could cause database passwords to appear in debugging
output when $Rose::DB::Debug was set to a true value. Also added
connection options to the debugging output.
0.785 (02.28.2023) - John Siracusa <siracusa at gmail.com>
* Added timestamps_are_inlined method to DBD::Pg. (Patch
by Ferry Hendrikx.)
0.784 (02.03.2023) - John Siracusa <siracusa at gmail.com>
* Added support for PDBs (Pluggable Databases) to DBD::Oracle. (Patch
by Ferry Hendrikx.)
* Added support for "numeric" booleans to DBD::Oracle. (Patch by Ferry
Hendrikx.)
Update to 0.44
Upstream changes:
0.44 Wed Jul 29 2026
- Embedded TrueType text is now searchable and copyable (GitHub #15,
RT #123564). A /ToUnicode CMap is generated for each embedded font,
covering only the glyphs actually used. Built here rather than via
Text::PDF::TTFont0, whose ToUnicode support emits a malformed CMap
(RT #123562, unfixed upstream).
- Fix "Didn't find pages" when a source filename is reused within one
session (GitHub #21, #22, RT #103758, RT #103768). %processed cached
byte offsets keyed by filename and was never invalidated when the
file behind that name was replaced, so the first file's offsets were
applied to the second file's bytes.
- CI now covers Linux, macOS and Windows again, with per-platform
isolation so one failing cell no longer masks the others
(GitHub #9, #10). Upstream workflow references are pinned to a SHA;
see docs/ci-pin-maintenance.md.
stand: consume UEFI PXE Base Code cache to seed DHCP
Populate stand/libsa/bootp.c's bootp_response global from the UEFI PXE
Base Code Protocol's cached DhcpAck, so bootp() can enter RFC 2131
INIT-REBOOT and skip DISCOVER/OFFER instead of running a fresh DHCP
transaction after the firmware has already done one.
Update to 6.1.0
Upstream changes:
v6.1.0 - 2026-07-19
- groff 1.24.0 broke use of the .IP macro for tag list formatting by
removing the mandatory spacing between the tag and the paragraph. Work
around this by using .TP for lists other than bullet or numbered
lists. Be aware that groff 1.24 and later defaults to a minimum gap of
two spaces between the tag and the paragraph for .TP instead of one
space as in previous pod2man and groff releases. POD documents that want
an indent just wide enough for tags to format on the same line as the
paragraph may need to increase the indent level for the =over command by
one to render as desired with those versions of groff.
- Change the default fixed-width font from CW to CR. This avoids warnings
with groff 1.24.0 or later at the cost of breaking troff output on
Solaris 10. nroff output and troff output on Solaris 11 are
unaffected. The pod2man option --fixed=CW will restore the previous
behavior. Thanks to G. Branden Robinson for the analysis and assistance.
(GitHub #43)
[24 lines not shown]
manuals: Fix Fx and nearby mechanical typos
Fix compiler warnings related to the Fx macro, as well as all other
mechanical typos that were visible within one screenful of them. These
cause rendering glitches on various toolchains with various of the five
and a half decades of rich output formats and tooling manpages scale to.
The *x macro set specifies operating systems. These macros take the rest
of the line as an argument. Sometimes, a space was not used to separate
the argument of Fx and the trailing period. Another, FreeBSD Foundation
was misrepresented as an operating system version instead of an author.
Two more had other parts of the sentence supplied as an argument to Fx.
While I had those open, fix the other mechancial typos visible on those
specific screenfulls. Fix a list width glitch, correct section typo
AUTHOR to AUTHORS, and switch AUTHORS sections containing prose to
prose-mode so that they wrap freely when rendered.
PR: 297248
[5 lines not shown]
[OpenMP][NFC] Drop `omptarget` prefix from CHECK lines in mapper present tests
Upstream 58f386207ac8 ("[offload] Remove `omptarget` references from
tests") made offload test CHECK lines generic so libomptarget components
can be moved/renamed -- some debug prints will come from `ompaccsupport`
rather than `omptarget`.
The two tests updated here re-add CHECK lines to files whose other
`omptarget`-prefixed lines that commit had already rewritten, so they
merged cleanly while reintroducing the old prefix. Match the convention
used by every other offload test. The address/size captures are
unchanged; only the component prefix is dropped.
Consolidate the managed-dataset registries and guard every mutator
## Problem
"Is this a dataset middleware manages?" was answered by five separate registries with four membership sets and three matching algorithms: `INTERNAL_PATHS` in `plugins/zfs/utils.py`, `INTERNAL_DATASETS` in `plugins/pool_/dataset_query_utils.py`, `internal_datasets_filters` in `plugins/pool_/dataset.py`, inline literals in `alert/source/datasets.py`, and `INVALID_DATASETS` in `plugins/zettarepl.py`. None had unit coverage, and they had drifted: `<pool>/ix-applications` was creatable and then permanently invisible because one carried a trailing slash the others lacked, `<pool>/ix-apps-data` was hidden forever on a substring match, and the replication registry did not know about the apps datasets at all. A sixth spelling in `docker/fs_manage.py` tested `startswith("boot-pool/")`, so it missed `freenas-boot` entirely and reported the boot pool's own root dataset as the mounted apps dataset on any system upgraded from a FreeNAS-era install.
"May this caller change it?" was answered by a `bypass` field on seven public snapshot request models. It was declared `SkipJsonSchema`, which hides a field from the generated docs and JSON schema but does not block it at validation, so any caller holding `SNAPSHOT_WRITE` could send `bypass: true` and defeat every guard. The read side had the same defect twice: `exclude_internal_paths` on `ZFSResourceQuery`, and `exclude_internal_datasets` read out of `pool.dataset.query`'s free-form `extra` dict, where the model's `extra="forbid"` never reaches because it governs unknown model fields rather than keys inside a dict value. Either one let a caller holding nothing but read access enumerate every managed dataset, boot pool included. The root cause is the same in all three: an authorization decision encoded as request data -- a property of the caller modelled as a field of the request.
Separately, ten public mutators had no protection at all and none of them funnelled through a guarded implementation: `pool.dataset.promote`, `rename`, `set_quota`, `get_quota`, `lock`, `change_key` and `inherit_parent_encryption_properties`, both `zfs.tier` mutators, and `pool.snapshot.rename`. `promote` was the worst of them, since managed children are frequently clones and promoting one reparents its origin snapshot. `pool.snapshot.rename` turned out to be unreachable in any case: it passed a snapshot id to `zfs.resource.rename`, which rejects any name containing `@`, so the endpoint could not succeed for any valid input and had no test coverage.
The same whole-component test was also being asked about snapshots. `zfs.resource.snapshot.query` and `zfs.resource.snapshot.count` fed it names like `tank/.system at snap` and `boot-pool at snap`, where the suffix lands on the component being compared, so the answer was always False -- the per-snapshot filter and the opt-out that turns it off were both inert, and the count's direct-snapshot branch consulted neither. Nothing leaked, because a working dataset-level check filters the parent before any snapshot below it is reached. That is the problem rather than the reassurance: it leaves a dead guard sitting behind a live one, with nothing to fail if the live one is ever moved or dropped as redundant.
## Solution
- **One module, one predicate per question.** `utils/zfs/managed_datasets.py` replaces all five registries, with one function per caller decision -- `hidden_from_zfs_listing`, `hidden_from_snapshot_listing`, `hidden_from_dataset_listing`, `blocked_from_mutation`, `reserved_from_user_creation`, `excluded_from_zfs_events`, `excluded_from_replication` -- each spelling out its own membership and its own matching rule where you can read both at once. Two rules cover everything: compare a whole path component, or check whether any component below the pool root starts with a managed name. `hidden_from_snapshot_listing` is not a third rule -- it drops a snapshot suffix and asks `hidden_from_zfs_listing`, the way `deny_protected_snapshot` does for `deny_protected_path`. The refusal helpers `deny_protected_path` and `deny_protected_snapshot` sit in the same file directly beneath the predicate they gate, so answering "is this ours?" and "may this caller change it?" is one place to look rather than two files to choose between. Callers that must accumulate into `ValidationErrors` mid-pass, or that want to name the containing dataset rather than the path they were handed, ask the predicate directly; the helpers are a convenience for the one common message shape, not a boundary.
- **Two matching rules converged; everything else preserved.** `hidden_from_dataset_listing` now compares a whole path component like the ZFS listing does, rather than searching for a substring. `<pool>/ix-apps-data`, `<pool>/.systembackup` and `<pool>/foo/.system` are no longer hidden from `pool.dataset.query`, which had left them unmanageable -- the lookups behind `get_instance`, `update` and `delete` all run through that listing, so those datasets answered ENOENT forever. Separately, the creation and event views lose the trailing slash on their `ix-applications` needle, so `<pool>/ix-applications` is now refused at creation instead of being created and then vanishing from every listing. Both changes only ever expose or refuse; nothing is newly hidden, and no owner subsystem loses access. Every other predicate keeps the matching algorithm its callers used before, so the predicates still disagree with one another in places -- those disagreements are what the five registries were quietly doing in five spots, and they are now visible in one source file instead. `.truenas_containers` takes part in the product listing only, reproducing today's behaviour while containers are addressed separately; that leaves it destroyable through `zfs.resource.destroy` while `pool.dataset.delete` answers ENOENT, which is written down rather than quietly fixed.
- **The overrides are off the wire.** `bypass`, `exclude_internal_paths` and `exclude_internal_datasets` are gone from the public surface, replaced by parameters on `@private` implementations, which JSON-RPC cannot populate because it dispatches through the request model. `pool.dataset.query` had no private chokepoint to move its flag onto, so `query_impl` is added and the shared body factored out behind it; a key a caller leaves in `extra` is popped and discarded rather than rejected, since it was never on a model and ignoring it fails in the safe direction. The mutation privilege is now a typed `InternalAccess` enum rather than a bool, so a stray value fails closed instead of silently permitting, and `InternalAccess.ALLOW` is a unique token that greps out the complete list of privileged callers. It is str-valued and coerced rather than identity-compared so it survives the JSON hop in `failover.call_remote`, which the audit dataset relies on -- and because the value genuinely arrives as a plain string on the peer node, the receiving implementations type the parameter `InternalAccessArg`, so nobody is invited to write an identity test that would read as DENY on one node of an HA pair. `InternalAccess` also refuses `bool()`: both members are non-empty strings and therefore truthy, so an unguarded `if access:` would read DENY as permission granted. Answering `self is ALLOW` would be worse than refusing, since the plain string on the far side of `call_remote` cannot carry the override and the same expression would come out differently on the two nodes. `v26_0_0` is left alone: the version adapter already drops fields absent from the newer model, and editing a frozen version would turn a silent drop into a hard failure for old clients.
[10 lines not shown]
[flang][cuda] Only register module variables defined in the current translation unit (#213720)
CUFAddConstructor registered every CUF module variable mirrored in the
GPU module, including variables brought in with USE from another
translation unit. Without relocatable device code each translation unit
has its own device module, so registering a declaration binds the host
address to a module that does not contain the symbol, and a later
cudaGetSymbolAddress fails with cudaErrorInvalidSymbol or
cudaErrorSymbolNotFound. Under unified memory the same declaration is
registered as host memory, overriding the defining unit's device
registration.
Skip globals that have no initializer and no body. Non-allocatable
managed globals still register, since they go through a companion
pointer local to the translation unit.
[Offload] Add `--kernel <name>` command to `llvm-gpu-loader` (#213738)
Summary:
This makes it easier to test a single function without opting-in to the
whole `crt1.o` infra for `libc` that was originally intended to test
existing CPU tests. Good for possible future unit tests, cheap tool that
can launch a kernel. Only provides `foo(void)` kernels for now, can be
improved.
[ADT] Fix - gcc warning: buf may be used uninitialized [-Werror=maybe-uninitialized] (#213578)
When compiled with `gcc`, the uninitialized `buf` triggers a warning.
Since some external projects (e.g., `TPP-MLIR`) treat warnings as
errors, the build fails. This patch initializes `buf` to eliminate the
warning and prevent those build failures
initrd/mkinitrd.sh: Force strip the binaries to fix size exceeding
A user may set DEBUG_FLAGS in /etc/make.conf to retain debug symbols
during the installation phase, so the copied /rescue tools containing
the debug symbols would exceed the allowed maximum initrd image (current
15MB) and then break the installworld phase.
This issue was introduced by my commit 9d10863cc2df1e9077eb6405dd8572c243ba94d7
that removed the hardcoded 'strip' invocation from crunchgen(1)-
generated makefiles.
Now we force strip the binaries after copying them to the initrd build
directory.
Reported-by: swildner
Discussed-with: swildner
initrd/oinit: Implement login_tty() to avoid depending on libutil
Copy the login_tty() from libutil and thus remove the dependency on
libutil. However, this doesn't reduce the final binary size...
Meanwhile, remove unnecessary header inclusions.
initrd: Exclude 'oinit' from rescue tools
oinit is a stripped-down init(8), so it's only useful on an initrd
image. Move it from ${RESCUE_SUBDIRS} to ${INITRD_SUBDIRS} and remove
the existing /rescue/oinit. Adjust the makefiles to simplify the
installation logic.
initrd/mkinitrd.sh: Actually use check_initrd() and small changes
* The check_initrd() was not used. Now use it before making the image.
* Simplify the awk command to be bc(1) to round up the image size.
* Shell syntax and style cleanups.
nfs_commonkrpc.c: Fix recovery that was broken by 4d80d4913e79
Commit 4d80d4913e79 added a check for nfsess_defunct already
being set. This was incorrect because, once set, nfsess_defunct
remains set and an additional recovery might be needed.
This patch reverts this part of 4d80d4913e79.
PR: 297252
Suggested by: olivier
MFC after: 3 days
Fixes: 4d80d4913e79 ("nfs: Fix argument typo to avoid a crash")
[SimplifyCFG] Do not thread branches into uncontrolled convergent regions
SimplifyCFG's foldCondBranchOnValueKnownInPredecessor can thread an edge past
a block that acts as a reconvergence point. If the threaded destination reaches
an uncontrolled convergent operation before returning to the threaded-through
block, the transform can change which dynamic instance of the convergent
operation is executed.
Add a conservative destination scan for this fold and skip the threading
candidate when it can reach an uncontrolled convergent call before returning
to the original block. Controlled convergent operations using convergence
control tokens are left alone.
Fixes ROCM-26496.