RuntimeLibcalls: Use element alignment for vector libcall out pointers
The pointer arguments of the vector modf, sincos and sincospi functions
are linear pointers to the scalar element type (e.g. the l4 in
_ZGVnN4vl4l4_sincosf), not pointers to the vector type. Only the element
alignment is guaranteed, so stop declaring them with the ABI alignment
of the vector.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add signatures for more runtime functions
Add type missing signatures for assorted functions which were missing
type information.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Describe vector FuncArgTypes by element type and count
Define the vector libcall argument types from an element type and
count. Derive the matching integer and mask vector types from them
instead of spelling each one out.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Use the correct target C long width for Long
Long and ULong were mapped to the int width, which is wrong on LP64
targets (e.g. scalbln was declared taking i32 on x86_64 linux) and on
16-bit targets where long is 32 bits.
Also fix strtoul, strtoull, and the unsigned long operator new/delete
variants to use the unsigned types.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
zloop: Add -S to seed the randomized ztest arguments
zloop picks each iteration's pool layout and ztest options with an
unseeded bash RANDOM, and ztest draws its own seed from /dev/urandom.
To rerun a crashed ztest, a developer must find the command line in
ztest.history and the seed in ztest.out and combine them by hand, and
a zloop run cannot be repeated.
Add a -S option that seeds RANDOM. Every randomized argument and the
-J seed handed to each ztest run come from that one value, so rerunning
zloop with the same -S repeats the whole loop. zloop now logs the -J
seed as part of each ztest command line in ztest.history, so a
developer can copy one line to rerun a crashed ztest. The default seed
is random and is logged at the start of the run.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Daniel Perry <dtperry at amazon.com>
Closes #19637
[clang][OpenMP] Fix crash on `lastprivate` of a data member in a member function template (#237575)
Fixes #144302
`lastprivate(i)` on a data member inside a member function template of a
non-template class crashed in `EndOpenMPDSABlock`. In a dependent
context the clause keeps the member as the `this->i` expression, but the
finalizer cast every non-dependent item to `DeclRefExpr`.
Skip the member there and leave its private copy to be built when the
template is instantiated, where the member gets captured as usual.
LLM Aided.
nfs_clrpcops.c: Fix an mbuf leak introduced by fec497b89b1a
The calls to rpc_free_rdma_reduction() were removed, but I forgot
that newnfs_request() removes the reduction mbuf from the list
upon success, so it has to be free'd separately.
This patch does that.
The patch also disables reduction after the first loop interation.
This is necessary until nfsm_build_rdma_reduction() is patched
to handle an offset within the page array.
Reported by: markj
MFC after: 1 month
Fixes: 884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
[RISCV][GISel] Make G_CTLZ legal with XTHeadBb (#237510)
XTHeadBb provides `th.ff1` and matches `G_CTLZ` semantics. The existing
pattern `PatGpr<ctlz, TH_FF1>` is already imported by GlobalISel, but
the legalizer always lowered `G_CTLZ` when Zbb was not available, so
`th.ff1` was never selected.
Part of https://github.com/llvm/llvm-project/issues/237492.
I plan to address the whole problem with 3 patches to control patch size
and ease review process:
1. This commit
2. Use the zero-poison semantics of `G_CTLZ_ZERO_POISON` for narrower
widths.
3. Widen narrow `G_CTTZ` to XLEN before lowering.
[VPlan] Use the interleave group's alignment for narrowed accesses. (#237674)
Use the interleave group's alignment instead of the one from the insert
position, which may not be the alignment for the member at index 0.
This fixes a mis-compile where the wide load had an incorrect alignment.
cd9660: Fix dereferencing invalid RR outlen ptr
`ISO_RRIP_ANALYZE` is constructed in four places. Two of the
initializers set the `outlen` field while the other two,
`cd9660_rrip_analyze` and `cd9660_rrip_offset`, leave it uninitialized.
The uninitialized paths can dereference an invalid pointer on error
paths which causes a kernel panic.
To fix, I zero out `ISO_RRIP_ANALYZE` in all four places where it's
initialized and check that `outlen` is non-null on the error path
in `cd9660_rrip_loop`.
While testing the above, I encountered another kernel panic due to
mounting continuing after the error branch. Evidently, the ISO continued
mounting through the normal ISO 9660 path then triggered a panic down
the line due to a very broken file system from the ISO. To fix that, I
propagate the error from the RR path then fail in the mount path.
[11 lines not shown]
RuntimeLibcalls: Describe vector FuncArgTypes by element type and count
Define the vector libcall argument types from an element type and
count. Derive the matching integer and mask vector types from them
instead of spelling each one out.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add signatures for more runtime functions
Add type missing signatures for assorted functions which were missing
type information.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Use element alignment for vector libcall out pointers
The pointer arguments of the vector modf, sincos and sincospi functions
are linear pointers to the scalar element type (e.g. the l4 in
_ZGVnN4vl4l4_sincosf), not pointers to the vector type. Only the element
alignment is guaranteed, so stop declaring them with the ABI alignment
of the vector.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Use the correct target C long width for Long
Long and ULong were mapped to the int width, which is wrong on LP64
targets (e.g. scalbln was declared taking i32 on x86_64 linux) and on
16-bit targets where long is 32 bits.
Also fix strtoul, strtoull, and the unsigned long operator new/delete
variants to use the unsigned types.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
zfs: reject 'bookmark -r' to a dataset other than the source's
"zfs bookmark -r" only used the part of the new bookmark name after the
'#' and always started recursion from the source snapshot's dataset, so
the dataset part of the bookmark name was silently ignored:
zfs create tp/a; zfs create tp/b; zfs snapshot tp/a at s
zfs bookmark -r tp/a at s tp/b#bk
succeeded and created tp/a#bk (and the same on every descendant of
tp/a that has @s), while tp/b got nothing. Without -r the same command
is refused because the source is not an ancestor of tp/b.
With -r the bookmarks are always created on the source snapshot's
dataset and its descendants, so require the new bookmark to name that
dataset and fail with a clear message otherwise, before creating
anything. The short forms ("zfs bookmark -r fs at snap '#bk'" and
"zfs bookmark -r @snap fs#bk") are unaffected since their dataset is
taken from the other argument.
[8 lines not shown]
ZTS: test 'zfs bookmark -r' to another dataset
Extend zfs_bookmark_recursive to check that 'zfs bookmark -r' refuses
a new bookmark on a dataset other than the source snapshot's and
creates no bookmarks at all, and that the short forms ('#bookmark' and
'@snapshot') still work with -r.
This currently fails: "zfs bookmark -r tp/a at s tp/b#bk" succeeds and
creates tp/a#bk and the same bookmark on tp/a's descendants, ignoring
the dataset that was named. The fix follows in the next commit.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Closes #19298
RuntimeLibcalls: Add signext/zeroext attributes to libcall signatures
Try to match TargetLibraryInfo's behavior. Integer types narrower than
int are extended according to their signedness.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>