[Darwin][TSan] Fix false positive race report when using dispatch_apply (#204866)
Currently I have seen some false positive race reports caused by
instrumented block copy code that writes after the release-annotation.
When the block runs on another thread and reads the copied data, it
incorrectly reports this as a race.
This patch casts the block to a `void *` in order to avoid the block
copy - thus avoiding the reported race. This is safe because
`dispatch_apply` runs synchronously, so the block lives beyond all
invocations.
rdar://92286127
[lit] Fix builtin diff importing system lit.util in subprocess mode (#206723)
'import lit.util' silently picks up a system-installed lit package
instead of the local one, which may lack abs_path_preserve_drive.
Switch to 'from .. import util': in subprocess mode __package__ is None,
so the relative import raises ImportError and the fallback correctly
picks up the local util.py via PYTHONPATH
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
libc: gen: add a test for rtld underflowing our posix_spawn thread
This is a distillation of the environment described in the PR, using
a dummy shlib and mapping it repeatedly. This takes advantage of the
guard page added in 2767a1f3686e5b16 to reliably crash if rtld tries to
scale its stack usage excessively with the # DSOs loaded.
PR: 295991
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57954
ping: Fix bell char ordering in -A test cases
Previously, these tests expected the bell chars to arrive
before the initial status line. This appeared to be ok because
ping(8) incorrectly mixed unbuffered and buffered writes by using
printf(3) calls for the initial status, but direct write(2) calls
for the bell chars. 141bb85798 revealed that the test's assertions
only passed because the buffered writes did not get flushed before
the direct writes in the test runs.
8bda488114f3 fixed ping(8) to use POSIX stdio buffered writes
in all cases and guarantee a deterministic output ordering to stdout
observers. This patch fixes the test to match the correct ordering.
Reviewed by: des
Sponsored by: The FreeBSD Foundation
Revert "ping/tests: expect bell chars from stderr after initial status"
This reverts commit 5b8c28adb829b50fb8ac065637fa99f717858bab.
The commit message was wrong.
Reported by: des
[LoopInterchange] Add test with dependency `[* =]` and `[= *]` (NFC) (#193479)
Add test cases that are legal to interchange but currently cannot be
interchanged due to restrictions in the legality check.
NAS-141564 / 26.0.0-RC.1 / Fix failing directory services tests (by anodos325) (#19211)
Change in backend presentation of errors in middleware responses
basically broke the pytest expectations of exception types. This
switches to simpler regex matching.
Original PR: https://github.com/truenas/middleware/pull/19210
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
[clang][bytecode] Check pointer types in ::toRValue() (#206712)
Now that we let more reinterpret_casts through, we need to check we have
the proper type here, too. We already did that for some of the types but
not for records and arrays.
NAS-141586 / 26.0.0-RC.1 / Use truenas_streams_xattr VFS module name for Samba 4.24 (by anodos325) (#19225)
Samba 4.24 forks the TrueNAS streams_xattr customizations into a
separate module, truenas_streams_xattr. Emit that name in the generated
vfs objects line so shares get the TrueNAS backend instead of silently
falling back to upstream's streams_xattr. Parametric options keep the
streams_xattr: prefix (the module still reads them there), so only the
module name changes.
Original PR: https://github.com/truenas/middleware/pull/19224
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
[LIBC][ARM] Enable MMU setup and alignment fault handling during startup. (#204803)
This change adds MMU initialisation for Arm targets and configures
alignment fault behaviour.
This patch:
1. Add MMU setup for AArch64 startup.
- Create a minimal flat-mapped translation table.
- Configure TTBR0_EL1, MAIR_EL1, and TCR_EL1.
- Mark stack/heap memory as execute-never (XN) when possible.
- Enable the MMU and configure alignment checking through SCTLR_EL1.
2. Add MMU setup for ARMA startup:
- Create a flat 1 MB section mapping covering the address space.
- Configure DACR, TTBCR, and TTBR0.
- Enable MMU, instruction cache, and data cache.
- Configure alignment fault handling through SCTLR.
3. Enable unaligned access trapping on Arm M-profile targets when
[7 lines not shown]
[AArch64][llvm] POE2: remove TPMAXn_ELn/TPMINn_ELn and create TPCRn_ELn registers
Some POE2 system registers have been removed/created:
* `TPMAXn_ELn`/`TPMINn_ELn` system registers are now removed
* these encodings are reused in new `TPCRn_ELn` system registers
Adjusted testcases as appropriate.
[AArch64][llvm] Generate asm parser extension map from TableGen (NFC)
Modify ARMTargetDefEmitter to emit the assembly parser `ExtensionMap[]`
and replace the hand-written table in AArch64AsmParser.cpp with the
generated one.
Keep the assembly parser-only quirks in the emitter: the directive
denylist, the legacy primary spellings for `mte` and `compnum`, and the
extra bits needed for the `sve2-*` shorthand extensions.
This removes the duplicate manual table while preserving existing
directive parsing and required-feature diagnostics.
[compiler-rt][test][builtins] Check linker support for --start-group (#205610)
This patch is to add a check for the linker whether the --start-group
option is supported before passing to the linker. This can accommodate
different linker requirements.