[AArch64] Update test generator script for atomics
Update the test generator script to generate tests for atomic fp stores
where the value being stored is a constant positive zero. This case
differs from rest of the fp stores because of the fact that positive
zero is same as integer zero which can benefit from use of zero register
from GPR bank.
ZTS: test txg cost and atomicity of batch snapshot destroy
lzc_destroy_snaps() promises that a batch is all-or-nothing and that
every failing snapshot is reported, and a batch has historically cost
one txg sync. Nothing in ZTS checks either, so the per-snapshot
sync-task loop added by 1cec121afb broke both without a test failing.
zfs_destroy_batch_txg destroys 50 snapshots in one call and requires
at most 5 txg syncs; the per-snapshot loop costs 50.
zfs_destroy_batch_errlist holds two of five snapshots, destroys all
five in one batch, and requires that none is destroyed and both held
snapshots are reported. It also checks that a missing name in a batch
is ignored.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Prakash Surya <prakash.surya at perforce.com>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19865
dsl: preserve atomic batch snapshot destruction
dsl_destroy_snapshots_nvl() promises that a failed batch destroys no
snapshots, but it runs and waits for one sync task per member. A later
failure can therefore leave earlier snapshots destroyed, and only the
first failure is reported.
Use one sync task for the complete batch. Check every admitted snapshot
and collect its error before applying any destruction under the same
config-writer lock. Preserve absent snapshots, deferred destruction,
and task-level errors.
Add order-sensitive coverage for held snapshots, complete error
reporting, absent members, and adjacent snapshot chains.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Prakash Surya <prakash.surya at perforce.com>
Signed-off-by: Kamil Monicz <kamil at monicz.dev>
Closes #19865
[mlir][tblgen] Fix attr constraints that use $_op (#244902)
[mlir][tblgen] Fix attr constraints that use $_op
Uniqued attribute constraints referencing `$_op` fail to compile:
mlir-tblgen expands the predicate inside the `emitError`
overload (introduced in 5e118f933b65), which has no `op` parameter.
Since `verifyInherentAttrs` already skips these constraints, emit only
the `Operation *` overload for them and share the `$_op` check through
`constraintReferencesOp`.
Property constraints have the same bug (left for a follow-up).
Fixes #69789.
[SLP]Initial support for SESE region vectorization
Non-schedulable same-opcode instructions from different blocks of a
region are vectorized once in the region entry, before its first
scalar.
Assisted-by: Cursor
Pull-request: https://github.com/llvm/llvm-project/pull/237059
Reviewers: RKSimon, bababuck
Reviewed-by: bababuck
pf: fix displaying expired states
pf_state_expires() returns <= time_uptime for expired states. For such
states we should return a PF_ST_EXPIRE value of 0 to userspace.
We used to return the timestamp at which the state expired, which
resulted in nonsensical expiry times being printed. That in turn caused
the pfsync:expire_underflow test case to intermittently fail.
Adjust the test case to account for expired states now showing 'expires
in 00:00:00'.
Sponsored by: Rubicon Communications, LLC ("Netgate")
pf: extend stricter checking for ICMPv6 packets
Now that we copy in the full MLD/ND packet we can sensibly inspect
their contents, and use them to generate more unique states for their
respective ICMPv6 packets.
Obtained From: OpenBSD, mcbride <mcbride at openbsd.org> 70bf7555ef4c
Sponsored by: Rubicon Communications, LLC ("Netgate")
if_ovpn: defer freeing of struct ovpn_kkey_dir
These keys are used in the data path, but can be freed through control
operations such as OVPN_NEW_KEY and OVPN_DEL_KEY. That might cause us to
use a freed key while processing packets.
Avoid this by using epoch callbacks to free the keys. That means that
the key is guaranteed not to be freed until after we're done with any
packet that could be using it.
Reported by: Kevin Day <kevin at your.org>
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
[Modules][ObjC] No methods are visible when messaging id in local submodule visibility (#247766)
When checking for known methods, use Sema::isVisible instead of
Decl::isUnconditionallyVisible.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
rdar://193808802
Don't trust dn_maxblkid for power-of-2 blocks in dmu_read_impl()
dmu_read_impl() zero-fills any range past the first block when
dn_maxblkid == 0. dbuf_dirty() publishes a new dirty record before
dnode_new_blkid() raises dn_maxblkid, and on Linux the
dn_struct_rwlock upgrade always drops and re-acquires the lock, so
another writer to the same block can find it already dirty, skip the
raise, and read its own data back while dn_maxblkid is still 0. For
WR_COPIED log records this logged sync writes with all-zero payloads,
which were replayed as zeros after a crash.
Only objects with an odd (non power-of-2) block size are guaranteed
to have a single block, so limit the shortcut to them. Power-of-2
objects take the normal path, which finds dirty dbufs or holes.
Normal read(2) uses dmu_read_uio_dnode() and is unaffected.
The free path makes a similar dn_maxblkid assumption; it is addressed
separately by raising dn_maxblkid before the dirty record is
published in dbuf_dirty().
[4 lines not shown]
RuntimeLibcalls: Add SME attributes to the AArch64 SME support routines (#245123)
SMEAttrs currently assumes these attributes based on the function
name. Add them to the function definition so this code can be cleaned
up in the future.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[flang] Keep complex powers with a negative constant exponent (#244671)
The algebraic simplification pass rewrites `z**(-n)` as `1 / (z * ... *
z)`. When that complex division is expanded inline, for example with
`-fcomplex-arithmetic=basic`, its intermediate results can overflow
although the power is representable. This patch keeps the power, so that
it is lowered to a runtime call.
**Option:** `keep-negative-complex-powi=false` restores the rewrite.
**Example:**
```fortran
subroutine s(a, b)
integer, parameter :: k = -2
complex(8) :: a, b
a = b**k
end subroutine
```
[17 lines not shown]
yp_unbind(3): Avoid null pointer deref after a yp operation.
Not a thread-safety issue -- this happens deterministically in a
single-threaded program if you do, e.g.:
yp_bind(domain);
yp_all(domain, ...);
yp_unbind(domain);
PR lib/61064: libc dumps core because yp nis not thread safe
libc/yp: Paranoia: avoid arithmetic overflow in allocation sizing.
Not sure if these paths are possible to hit, but let's make sure they
don't lead to disaster downstream.
Followup prompted by:
PR lib/61064: libc dumps core because yp nis not thread safe
[lld][MachO][NFC] Tag SymbolTable additions and duplicate diagnostics with EventKey
This is part of the ld64.lld performance improvements tracked by #222068 and #238938.
Tag symbol additions and duplicate-symbol diagnostics per shard with an EventKey encoding (batch, file, event) and merge batch additions in key order in endBatch(), keeping getSymbols() and duplicate diagnostics deterministic independently of insertion order.
This is part of a series of PRs that's setup work for turning on parallel sharded symbol-table insertion.
[lld][MachO][NFC] Shard SymbolTable lookup map by symbol name hash
This is part of the ld64.lld performance improvements tracked by #222068 and #238938.
Split SymbolTable's name map into 64 shards indexed by the high bits of CachedHashStringRef::hash(), storing Symbol* directly in each shard's DenseMap and allocating SymbolUnion instances with makeThreadLocal().
This is part of a series of PRs that's setup work for turning on parallel sharded symbol-table insertion.
[DWARFLinker] Differentiate unit-local functions sharing a linkage name (#247763)
The parallel linker uniques a function by its linkage name. That name is
unique across units only if the function is external. Two units can each
have a static init(), or instantiate a template over their own lambda,
and get the same mangled name for different functions. They were merged
into one DIE, and .debug_names kept an entry per unit:
```
error: Name Index @ 0x0: Entry @ 0x18a: mismatched Name of DIE @
0x226: index - call<(lambda at b.cpp:5:12)>; debug_info -
call<(lambda at a.cpp:2:46)>, call, _Z4callIZL4initvE3$_0EiRT_.
```
For a function that is not external, add the declaration file and line
and the template arguments to the name. Copies of one static inline
function from a header still merge.
An external function whose DW_AT_name differs between units still gets
[3 lines not shown]
reaper_abandon_children(): leave no orphans on a reaped reaper
A reaper which exited stays the reaper of its subtree until it is
reaped, and processes can be linked onto its orphan list after its
exit1() emptied it. PT_ATTACH puts there a child which stayed with its
zombie reaper parent. Since 38ab6d47b7cb, reaper_adopt() puts there a
traced process which the zombie gets when a subreaper is reaped. When
the zombie is reaped in turn, reaper_abandon_children() keeps an orphan
holding a zombie reference with it, as is right only for
PROC_REAP_RELEASE. The struct proc is freed with the orphan still
linked to it, and proc_realparent() returns the freed or reused struct
proc on PT_DETACH, on the exit of the debugger, and from wait(2).
When the reaper is reaped, pass every orphan on to the new reaper, as
its children are. Anything linked onto the orphan list of a zombie
reaper is on its reaplist, so this empties the list. Assert that in
proc_reap().
Reported by: llm-postcr
[4 lines not shown]
tests/sys/kern/ptrace_test: reap a reaper which has a traced orphan
Add ptrace__parent_reaper_exits_before_attach, where the parent of the
traced child, also its reaper, exits before the attach. The child stays
with the zombie, and the attach puts it on the orphan list of the
zombie.
Add ptrace__reaper_exits_before_subreaper, where the parent of the
traced child is a subreaper, and the reaper above it exits first.
Reaping the parent while the reaper is a zombie hands the child over to
the zombie, and links it onto the orphan list of the zombie.
In both tests, the test process then reaps the zombie, detaches from
the child, and waits for it. Before the fix, the child stayed on the
orphan list of the freed reaper, and PT_DETACH handed it to the freed
struct proc.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[DWARFLinker] List the empty directory in a DWARF 5 type unit (#247761)
A file with an absolute name has no directory. The type unit gave such a
file directory index 0 without adding a directory. That is right before
DWARF 5, where index 0 is the compilation directory and is not listed. A
DWARF 5 table lists every directory, so when all files were absolute the
table had none and could not be parsed:
```
warning: parsing line table prologue at 0x00000000 found an invalid
directory or file table description at 0x0000001f
error: DIE has DW_AT_decl_file with an invalid file index 0 (the file
table in the prologue is empty)
```
Add the empty directory to a DWARF 5 table like any other.
rdar://184768136
Assisted-by: Claude