Convert boot plugin to typesafe pattern
## Problem
The boot service was old-style dict-based code spread across three files (boot.py, boot_/format.py, boot_/boot_loader.py) that all declared the same BootService, so the framework silently merged them into a CompoundService. None of it was type-checked end to end, and every in-process consumer reached it through untyped string middleware.call('boot.*').
## Solution
- Consolidate everything into a single plugins/boot/ package using the port pattern: a lean BootService in __init__.py that delegates to plain, fully type-annotated module functions in disks.py/format.py/pool_ops.py, with @api_method(check_annotations=True) public methods and @private stubs. boot.get_state now returns a BootGetState model; internal callers use a dict state helper so nothing breaks on attribute-vs-key access.
- Register boot in main.py's ServiceContainer and have it own boot.environment as a sub-service, replacing BootServicesContainer.
- Expose the boot-pool name/disks cache through accessor functions instead of a module global. This also fixes a latent bug where libvirt/cdrom.py imported the global at module load (before setup runs), bound it to None, and so never filtered the boot pool out of CDROM path validation.
- Convert every same-process boot.* string call to typed call2/call_sync2 across sysdataset, zfs_events, disk, failover, and the zpool/audit/tunable/update/system_advanced plugins, the alert sources, and the cron/fstab makos, keeping each site's sync/async flavour.
- Keep the private update_initramfs/format models in the plugin (check_model_module requires private-method models to live there, not in the api package) and import them lazily from consumers, otherwise pulling boot/__init__ into the early service-init chain deadlocks on a partially-initialised middlewared.service.
- Add plugins/boot/ to mypy.yml.
Convert boot plugin to typesafe pattern
## Problem
The boot service was old-style dict-based code spread across three files (boot.py, boot_/format.py, boot_/boot_loader.py) that all declared the same BootService, so the framework silently merged them into a CompoundService. None of it was type-checked end to end, and every in-process consumer reached it through untyped string middleware.call('boot.*').
## Solution
- Consolidate everything into a single plugins/boot/ package using the port pattern: a lean BootService in __init__.py that delegates to plain, fully type-annotated module functions in disks.py/format.py/pool_ops.py, with @api_method(check_annotations=True) public methods and @private stubs. boot.get_state now returns a BootGetState model; internal callers use a dict state helper so nothing breaks on attribute-vs-key access.
- Register boot in main.py's ServiceContainer and have it own boot.environment as a sub-service, replacing BootServicesContainer.
- Expose the boot-pool name/disks cache through accessor functions instead of a module global. This also fixes a latent bug where libvirt/cdrom.py imported the global at module load (before setup runs), bound it to None, and so never filtered the boot pool out of CDROM path validation.
- Convert every same-process boot.* string call to typed call2/call_sync2 across sysdataset, zfs_events, disk, failover, and the zpool/audit/tunable/update/system_advanced plugins, the alert sources, and the cron/fstab makos, keeping each site's sync/async flavour.
- Keep the private update_initramfs/format models in the plugin (check_model_module requires private-method models to live there, not in the api package) and import them lazily from consumers, otherwise pulling boot/__init__ into the early service-init chain deadlocks on a partially-initialised middlewared.service.
- Add plugins/boot/ to mypy.yml.
[Clang] [Docs] Add release note for expansion statements (#208878)
This was supposed to be part of the original patch, but we lost it
because I didn't pay enough attention when I was merging the release
notes after the migration from RST -> MD (I deleted the RST file but
forgot to move the release note to the MD file...)
[LLDB] Detect Memory overlapping between AllocateMemory and MemoryInfo
IRMemoryMap estimates a free address range using memory information.
However, the memory returns by AllocateMemory can overlap with the
ranges reported by MemoryInfo (internally backed by PT_VM_ENTRY),
because the kernel is unaware of allocations made during the probing
process.
As a result, two allocatios may silently insert duplicate key for
different objects, leading to intermittent test failure. The issue is
nodeterministic because it depends on the underlying malloc
implementation and ASLR.
Fix this by detecting overlapping allocations after AllocateMemory. If
an overlap is found, fall back to the address-guessing path, which
perform the necessary overlap checks before committing the allocation.
Also, return and print message in IRInterpreter in unsecessful allocation.
[LLDB] Print stderr in HandleStop
There are some testcases silently fail in stopping hook without
returning anything on FreeBSD. We dump the error from the handler to
make it easier to debug.
Cause src/lib/libc/get/sysctl.o to depend upon /dev/null
This is ugly in the extreme, unreliable really, and just bad.
Yet it seems to be reasonably effective in causing sysctl.o to
be rebuilt every time libc is being rebuilt (which is an aim).
There surely must be a better way. If someone knows what that is,
and it actually works, please replace this with that better way.
[Utils] Improve documentation for `cloneLoopWithPreheader()` (#208817)
Fixed #191471.
The client needs to further update the CFG and DominatorTree after
calling `cloneLoopWithPreheader()` to ensure the IR remains valid,
the function itself does not automatically update the control flow fully.
Clarified and improved the comments for the function.
x86: Redo boot-time XSAVE area size ABI check.
Instead of checking each component's offset+size from
size = CPUID[EAX=0x0d,ECX=i].EAX,
offset = CPUID[EAX=0x0d,ECX=i].EBX,
to make sure it fits in the XSAVE_MAX_BYTES implied by the
MINSIGSTKSZ ABI parameter, just check the total _enabled_ XSAVE area
size from
CPUID[EAX=0x0d,ECX=0].EBX,
which is what we use to allocate the XSAVE area in software anyway.
The Intel documentation[1] is not very clear on exactly what
CPUID[EAX=0x0d,ECX=i] reports for i >= 2, saying `valid bit in the
XCR0 register' without distinguishing `supported' from `enabled'
bits, and the AMD documentation I skimmed didn't have these leaves in
[16 lines not shown]
[libc++] Replace the of use custom sections for detecting overriden functions (#208330)
This is a follow up to #133876 and an alternative to #120805 which
doesn't rely on aliases and works across both ELF and Mach-O. This
mechanism is preferable in baremetal environments since it doesn't
require special handling of the custom sections.
Add build option CLANG_INCLUDE_EXAMPLES (#187317)
Adds a new build option for clang, CLANG_INCLUDE_EXAMPLES, which
controls if the examples directory is included in the build. It defaults
to the value for LLVM_INCLUDE_EXAMPLES (same as CLANG_INCLUDE_DOCS and
CLANG_INCLUDE_TESTS)
Signed-off-by: Jade Abraham <jademabraham17 at gmail.com>