ZTS: chattr_003_neg: accept uutils ln's wording for EPERM
The ln of Ubuntu 26.04 is uutils coreutils 0.10.0, which reports EPERM
from link(2) as "Permission denied" (uutils/coreutils#15020, fixed
after 0.12.0). The test's ln step expects "Operation not permitted",
so it fails on every ubuntu26 run. Accept either message there.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rick Galliher <kcid at kcid.io>
Co-authored-by: Claude Mythos 5.2 <noreply at anthropic.com>
Closes #19972
scmcvs: Fix build on newer Illumos
On Illumos FD_ZERO expands to memset... but sys/select.h where
FD_ZERO is defined does not include string.h where memset is declared.
So include string.h to fix build on Illumos, include sys/select.h
that has FD_* on illumos just in case its implicit inclusion change.
nix: pin nixpkgs-illumos 6bc6504: boot-vm's log beside the image, the summary names the checkout
boot-vm wrote its console log in the current directory, in a checkout an
untracked file the next build refuses; the build's summary now says
which checkout its clean or dirty is of; and smartos.nix is callable
from nix-build as it is.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Copy trivially copyable non-byval indirect arguments (#244487)
The AArch64 ABI passes trivially copyable records and _BitInts larger
than 16 bytes as indirect values that require a copy on the caller side.
This was hitting an unimplemented case in the CIRABIRewriteContext.
This change updates the rewrite context to generalize the handling of
indirect arguments, removing some target-specific assumptions. The
record layout for some types must be examined to get correct handling
with the new implementation. CIRCodeGen was already producing the record
layout in these cases, but it was omitted from several hand-written CIR
tests, so those tests had to be updated to add it.
Assisted-by: Cursor / claude-opus-5.5
[SystenZ][z/OS] Beautify HLASM output
Instructions are currently indented by 2 spaces, which makes the output
hard to read. This changes increases the indentation to 10, which improves
the readability. The indent is now controlled by a constant instead of
hard-coded spaces.
RuntimeLibcalls: Add attributes to target memory helper libcalls (#244441)
Annotate the various target specific memcpy-like functions with known
alignments.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
net-im/tdlib-purple: Resurrect, now at 0.9.6
Changelog:
https://github.com/UnitedMarsupials/tdlib-purple/blob/v0.9.6/CHANGELOG.md
The port was removed on 2025-11-01 as broken: it no longer compiled
against a current net-im/tdlib, having been written for TDLib 1.7.9,
and upstream has not committed since December 2021.
This is a fork that tracks the modern API. 0.9.6 builds against TDLib
1.8.44 or newer, tested against 1.8.68, and gathers the good pull
requests left unanswered upstream: the 1.8 port itself, the option to
display self-destructing messages, and no longer adding group chats one
is not a member of. Beyond those it shows the thumbnail Telegram sends
with a video, describes the contents of message types it does not
support rather than only naming them, escapes text chosen by the remote
party before it reaches the conversation window, and its translations
display correctly in locales that are not UTF-8, with a Ukrainian one
added.
[46 lines not shown]
kern: Have .m rules depend on sys/tools/makeobjops.awk
Generated _if.[ch] files have to be rebuilt after commit bf362c1b41c8
("kobj: convert KOBJOPLOOKUP() to returning pointer to function"). Add
dependencies on the build tool in files.*.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61821
[flang][acc] Add isInternalLinkage to GlobalVariableOpInterface (#244676)
Add `GlobalVariableOpInterface::isInternalLinkage()`, defaulting to
false. The `fir.global` model returns true only when the linkage
attribute is internal. Unit tests cover the `memref.global` default and
fir.global with internal, external, and omitted linkage.
This lets OpenACC stand alone, without a Fortran linkage check.
Optimizations can then ask whether a global is internal and treat its
address as a local allocation when every use stays in one function.
---------
Co-authored-by: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
[RegAllocFast] Move every spilled DBG_VALUE to the stack slot (#239915)
When a live-out vreg is spilled after its def, spill() inserts a
DBG_VALUE for the stack slot at the spill and rewrites the vreg's
DBG_VALUEs below it to the slot, but only the ones that were left
unassigned. One that was assigned the vreg's register stays on it.
assignDanglingDebugValues() assigns the register when the def is
allocated, before the spill, so a DBG_VALUE right after the def keeps
the register and overrides the stack slot DBG_VALUE inserted in front
of it. If the register is then clobbered before the end of the block,
the variable has no location until the clone of the stack slot
DBG_VALUE before the terminator.
This shows up with rustc, which describes an argument passed by
reference with #dbg_declare on the incoming pointer. SelectionDAGISel
places a DBG_VALUE for the pointer's livein copy right after the copy.
On sparc64 with -relocation-model=pic, %i0 is reused for the GOT base
in the entry block, and gdb prints <optimized out> for the argument.
[6 lines not shown]
[AMDGPU] Keep soft waitcnts unchanged until SIInsertWaitcnts converges
On the first visit to a loop header only the preheader state is known.
A soft waitcnt there (e.g. from a release fence) can have some of its
counters simplified away while another counter keeps the instruction
alive: the fence's own vmcnt(0), a preceding wait.asyncmark, or an
explicit s_waitcnt. The soft waitcnt was then rewritten with the
simplified value and promoted to a hard waitcnt, or merged into a
preceding hard one. When the back edge later brought a pending LDS
store, the original lgkmcnt(0) request was gone, and the s_barrier after
the release fence no longer waited for it.
Treat soft waitcnts as requests that depend on the incoming state: never
merge, promote or rewrite them while the analysis iterates. They are
kept unchanged in DeferredErasures, a hard waitcnt (existing or new)
carries what is needed on each visit, and the soft waitcnts are erased
once the analysis converges. This extends #220357, which did the same
only for soft waitcnts that were simplified away entirely.
[11 lines not shown]
[AMDGPU] Pre-commit tests for soft waitcnt requests lost at a loop header (NFC)
Two cases where a soft waitcnt at a loop header loses its lgkmcnt(0)
request: on the first visit no LDS operation is pending, so lgkmcnt is
simplified away while vmcnt keeps the instruction alive (either the soft
waitcnt's own vmcnt, or a preceding hard vmcnt(0) it is merged into).
The DS write in the loop is then not waited for before the S_BARRIER on
the next iteration. The checks show the current, incorrect output.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[libc] Implement syslog functions (#244029)
These functions write directly to a system log with a timestamp prefix
and printf semantixs after. This PR adds them with an internal core that
makes it easier to test, and appropriate tests.
This does not cover the more exotic logging facilities, such as sockets.
That can be covered in followup PRs as needed.
Assisted-by: Automated tooling, human reviewed.
[CodeGen] Query AA in cross-iteration mode for machine instructions (#226768)
`MemOperandsHaveAlias` queried alias analysis as if both memory operands
belonged to the same execution of the IR. After control flow
transformations such as tail duplication this no longer holds: an
address computed from a PHI can refer to the value of the next
iteration. On SystemZ the post-RA scheduler then moved a load above a
store to the same address (miscompile of a computed-goto dispatch, see
#226758).
This patch queries AA in cross-iteration mode
(`BatchAACrossIterationScope`), as the MachinePipeliner already does.
This affects all users of `MachineInstr::mayAlias`.
Tests: new `SystemZ/machine-sched-cross-iteration-aa.ll`; scheduling
changes in a few loop tests on SystemZ, AArch64, AMDGPU, ARM and
PowerPC; in `Hexagon/swp-alias-cross-iteration.mir` the dependency is
now a memory edge in the DAG instead of a pipeliner barrier.
[2 lines not shown]
[lldb][docs] Fix the Windows Python build options (#225465)
The Windows section of `build.md` incorrectly marks `PYTHON_HOME` as
required, and the example value `C:\Python35` is below the 3.11 minimum
on Windows.
Furthermore, nothing said that `LLDB_EMBED_PYTHON_HOME` (which is `ON`
by default on Windows) suppresses `LLDB_ENABLE_PYTHON_LIMITED_API`, and
that setting both is a configure error.
CodeGen: Look up instruction slot indexes without a hash map (#244079)
Replace the DenseMap from MachineInstr to SlotIndex with a handle
stored in MachineInstr indexing the slot index entry table. There's a
padding slot available so this doesn't increase size.
This also will make it more natural to start serializing the slot
index in MIR which will make reproducing issues easier in greedy.
llc instructions:u over 40 files per target:
x86_64 CTMark -0.64%
aarch64 CTMark -0.62%
amdgpu ROCm bitcode sample -0.43%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Clang][Sema] Add fortify warnings for fread_unlocked, fwrite_unlocked, and fgets_unlocked (#244378)
Add `-Wfortify-source` compile-time bounds checking for the GNU unlocked
`<stdio.h>` functions `fread_unlocked`, `fwrite_unlocked`, and
`fgets_unlocked`.
- Register `fread_unlocked`, `fwrite_unlocked`, and `fgets_unlocked` as
`GNULibBuiltin<"stdio.h">` builtins in `Builtins.td` (matching `fread`,
`fwrite`, and `fgets`, without `NoThrow` since they are cancellation
points).
- Reuse the existing `BIfread`, `BIfwrite`, and `BIfgets` logic in
`Sema::checkFortifiedBuiltinMemoryFunction` to diagnose destination
overflows (`fread_unlocked`), source overreads (`fwrite_unlocked`), and
too-large or negative sizes (`fgets_unlocked`).
- Add Sema tests covering direct calls, `diagnose_as_builtin` wrappers,
C++ non-`extern "C"` lookalikes, and strict `-std=c99` non-GNU mode, and
update `ReleaseNotes.md`.
Part of #142230
Assisted-by: Gemini
[Clang][Sema] Avoid APInt crash on narrow umask parameter types (#244358)
In `Sema::checkFortifiedLibcArgument`, constructing
`llvm::APInt(RawValue.getBitWidth(), 0777)` asserts when `umask` is
declared with an integer parameter narrower than 9 bits (such as `char`,
`bool`, or `_BitInt(8)`), since octal `0777` requires 9 bits.
Bail out alongside the `isIntegerType()` check when
`getASTContext().getIntWidth(Arg->getType()) < 16`, since POSIX `mode_t`
is at least 16 bits and narrower integer types cannot be POSIX `umask`.
Fixes #244171
Assisted-by: Gemini
sound: Unlock the channel when chn_reset() fails in dsp_chn_alloc()
If chn_reset() fails, dsp_chn_alloc() returns with the channel lock
held, dsp_open() calls dsp_close() as part of its cdevpriv error path,
and this causes both a mutex recursion on the channel lock in
dsp_close(), as well a lock order reversal.
Fixes: 02d4eeabfd73 ("sound: Allocate vchans on-demand")
Reported by: llm-postcr
MFC after: Immediately
Sponsored by: The FreeBSD Foundation
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D61793
(cherry picked from commit 01a8cd5ebe9368fd115fb5060bcb1e60d1bbdf1f)
sound: Unlock the channel when chn_reset() fails in dsp_chn_alloc()
If chn_reset() fails, dsp_chn_alloc() returns with the channel lock
held, dsp_open() calls dsp_close() as part of its cdevpriv error path,
and this causes both a mutex recursion on the channel lock in
dsp_close(), as well a lock order reversal.
Fixes: 02d4eeabfd73 ("sound: Allocate vchans on-demand")
Reported by: llm-postcr
MFC after: Immediately
Sponsored by: The FreeBSD Foundation
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D61793