[z/OS] Recognize EBCDIC archive magic (#186854)
`z/OS` archives use the same structural layout as traditional Unix
archives but encode all text fields in EBCDIC. The magic string is the
EBCDIC representation of `\"!<arch>\n\" (hex: 5A 4C 81 99 83 88 6E 15)`.
This patch adds recognition of the `z/OS` archive magic to
`identify_magic()` and defines the `ZOSArchiveMagic` constant. This is
the first in a series of patches adding `z/OS` archive support to LLVM.
mail/postfix: Enable CDB and LMDB by default
Adding these solves a cross-compatibility problem with Linux distros
that have dropped bdb support. Per Postfix's document[1] on it, lmdb
and cdb are the replacements for hash and btree, respectively.
[1] http://www.postfix.org/NON_BERKELEYDB_README.html
PR: 293852
Add tiering API
This commit modifies the truenas API to wrap around tiering design
in the following ways:
A new namespace zfs.tier. will be added. This contains global
configuration for systemwide tiering settings. Parameters include
- enabled: whether to enable tiering. This feature requries changes
to global ZFS behavior and we will have various internal checks
that check this value in datastore extend context methods.
- max_concurrent_jobs: the maximum number of concurrent rewrite
jobs (tier migrations for existing data).
- min_available_space: point in available space for a dataset where
tier migrations will error out.
The namespace will also support APIs for managing and querying
[9 lines not shown]
[DirectX] Fix assertion in PointerTypeAnalysis with empty global_ctors (#179034)
When `llvm.global_ctors` has no elements (e.g., when all resources are
unused in a shader library), its initializer is a `zeroinitializer`
(`ConstantAggregateZero`) rather than a `ConstantArray`. The previous
code used `cast<ConstantArray>` which asserts on incompatible types:
> "cast<Ty>() argument of incompatible type!"
This patch uses `dyn_cast` and returns early if the initializer is not a
`ConstantArray`, handling the edge case gracefully.
Fixes #178993.
Co-authored-by: Kaitlin Peng <kaitlinpeng at microsoft.com>
NAS-140335 / 26.0.0-BETA.1 / fix deadlock and resource leak in 3rd party module (by yocalebo) (by bugclerk) (#18486)
Cached D-Bus router for the SYSTEM bus.
Fixes upstream issues in jeepney's open_dbus_router:
1. `DBusRouter.__init__` eagerly fires a receiver task via
`asyncio.create_task` — we defer construction to first acquire.
2. `open_dbus_router.__aexit__` doesn't wrap `conn.close()` in
try/finally — a router teardown exception leaks the socket.
3. Every `open_dbus_router()` call opens a new connection + auth + Hello
handshake — we reuse a single connection.
4. Per-call routers produce orphaned background tasks that can trigger a
self-deadlock on CPython's `_global_shutdown_lock` when the GC finalizes
them inside `ThreadPoolExecutor.submit()`. A single long-lived router
eliminates this task churn.
Reconnects automatically when the receiver task dies or when any
unexpected error occurs during send (indicating a dead connection).
DBusErrorResponse is excluded from reconnect since it indicates a valid
[13 lines not shown]
[mlir][GPU] Refactor, improve constant size information handling (#186907)
1. There was duplicate code between the integer range analysis's
handling of static dimension size information (ex. gpu.known_block_dim
attributes) and the handling during the lowering of those operations.
The code from integer range analysis was given a dialect-wide entry
point (and had its types fixed to be more accurate), which the lowering
templates now call.
2. The templated lowering for block/grid/cluster_dim now produces
precise ranges (indicating the constant value) where one is known, and
the lowerings in rocdl (including those for subgroup_id) have been fixed
appropriately.
3. While I was here, the gpu.dimension enum has been moved to GPUBase so
it lives next to the other enums.
4. The pattern that expands subgroup_id operations now adds any thread
dimension bounds it finds in context.
(Claude was used for an initial round of review, I did the main coding
myself.)
[3 lines not shown]
NAS-140335 / 26.0.0-BETA.2 / fix deadlock and resource leak in 3rd party module (by yocalebo) (#18485)
Cached D-Bus router for the SYSTEM bus.
Fixes upstream issues in jeepney's open_dbus_router:
1. `DBusRouter.__init__` eagerly fires a receiver task via
`asyncio.create_task` — we defer construction to first acquire.
2. `open_dbus_router.__aexit__` doesn't wrap `conn.close()` in
try/finally — a router teardown exception leaks the socket.
3. Every `open_dbus_router()` call opens a new connection + auth + Hello
handshake — we reuse a single connection.
4. Per-call routers produce orphaned background tasks that can trigger a
self-deadlock on CPython's `_global_shutdown_lock` when the GC finalizes
them inside `ThreadPoolExecutor.submit()`. A single long-lived router
eliminates this task churn.
Reconnects automatically when the receiver task dies or when any
unexpected error occurs during send (indicating a dead connection).
DBusErrorResponse is excluded from reconnect since it indicates a valid
[10 lines not shown]
NAS-140335 / 27.0.0-BETA.1 / fix deadlock and resource leak in 3rd party module (#18483)
Cached D-Bus router for the SYSTEM bus.
Fixes upstream issues in jeepney's open_dbus_router:
1. `DBusRouter.__init__` eagerly fires a receiver task via
`asyncio.create_task` — we defer construction to first acquire.
2. `open_dbus_router.__aexit__` doesn't wrap `conn.close()` in
try/finally — a router teardown exception leaks the socket.
3. Every `open_dbus_router()` call opens a new connection + auth + Hello
handshake — we reuse a single connection.
4. Per-call routers produce orphaned background tasks that can trigger a
self-deadlock on CPython's `_global_shutdown_lock` when the GC finalizes
them inside `ThreadPoolExecutor.submit()`. A single long-lived router
eliminates this task churn.
Reconnects automatically when the receiver task dies or when any
unexpected error occurs during send (indicating a dead connection).
DBusErrorResponse is excluded from reconnect since it indicates a valid
[6 lines not shown]
NAS-140335 / 27.0.0-BETA.1 / fix deadlock and resource leak in 3rd party module (#18483)
Cached D-Bus router for the SYSTEM bus.
Fixes upstream issues in jeepney's open_dbus_router:
1. `DBusRouter.__init__` eagerly fires a receiver task via
`asyncio.create_task` — we defer construction to first acquire.
2. `open_dbus_router.__aexit__` doesn't wrap `conn.close()` in
try/finally — a router teardown exception leaks the socket.
3. Every `open_dbus_router()` call opens a new connection + auth + Hello
handshake — we reuse a single connection.
4. Per-call routers produce orphaned background tasks that can trigger a
self-deadlock on CPython's `_global_shutdown_lock` when the GC finalizes
them inside `ThreadPoolExecutor.submit()`. A single long-lived router
eliminates this task churn.
Reconnects automatically when the receiver task dies or when any
unexpected error occurs during send (indicating a dead connection).
DBusErrorResponse is excluded from reconnect since it indicates a valid
[3 lines not shown]
[Clang] Add __ob_trap support for implicit integer sign change (#185772)
The `__ob_trap` type specifier can be used to trap (or warn with sanitizers) when overflow or truncation occurs on the specified type.
There was a gap in coverage for this with the `-fsanitize=implicit-integer-sign-change` sanitizer. Fix this by carrying around `__ob_trap` information through `EmitIntegerSignChange()` which allows us to properly trap or warn.
[libc] Refactor core Linux syscalls to use syscall_wrappers (#185983)
This patch initiates the refactoring of Linux syscalls as described in
the RFC (https://discourse.llvm.org/t/rfc-linux-syscall-cleanup/87248/).
It introduces a new infrastructure in
`src/__support/OSUtil/linux/syscall_wrappers/` to house header-only
syscall wrappers. These wrappers utilize `ErrorOr` to provide a
consistent, type-safe interface for error handling across the library,
standardizing how syscall return values are converted into
errno-compatible Error objects.
Summary of changes:
- Created the `syscall_wrappers` directory and added `close.h`,
`read.h`, `write.h`, and `open.h`.
- Moved the existing `getrandom.h` into the new `syscall_wrappers`
directory and updated its callers (including HashTable/randomness.h).
- Refactored core entrypoints (`close`, `read`, `write`, `open`) to use
the new wrappers, removing direct `syscall_impl` logic and manual errno
[9 lines not shown]