[BUG] Runtime storage controls retain an undersized fixed arena #17
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/launchd#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Launchd runtime storage controls allocate a fixed 32-page (128 KiB) aligned stack array even though their configured 32 stream endpoint rows each retain a full 32 KiB owned IPC packet plus metadata. The packet storage alone exceeds 1 MiB. Slicing the old fixture to the computed native arena extent cannot fit, so these controls cannot reach the intended initialization assertions.
Reproduction
Source-confirmed at launchd
b9b676df57. Inspect src/runtime/storage.rs: its test configuration selects stream_endpoint_capacity=32 and its AlignedArena fixtures contain 324096 bytes. src/stream_invocation.rs retains IPC_TRANSPORT_MAX_BYTES_V1 plus the native receive header per endpoint; the canonical transport maximum is 321024 bytes.The relevant test command is
cargo test --bin launchd runtime::storage::tests. It has not been executed under the current testing waiver. Runtime frequency and clean-checkout execution are unmeasured.Expected and actual behavior
Expected: allocate aligned fixture storage from the actual compiler-derived extent, then exercise accepted, short, long, misaligned and overflowing arena admission without a fixture-only size ceiling.
Actual source behavior: computed extent exceeds the fixed array before initialization can be invoked. A bounds failure is implied by the source geometry; no executed exit status, test log or CI result is claimed.
Environment and identity
b9b676df57on feature/posix-compat; Integration catalog b643e286db8c33fdc18c89250ff3c07476b86bf7.Evidence and prior checks
The contradiction follows directly from the explicit fixture size, configured row count and per-row packet type. Repair should use heap-owned bytes with an explicitly aligned sub-slice sized from actual layout, retain the existing negative cases, and author a control exceeding the retired fixture ceiling. Tests, builds and CI observation remain deferred.
Tracking
Original readiness, Launchd review, and phase completion. No executed reproduction is asserted.
Resolution
The signed repair 1d5ed598 replaces the fixed stack array with heap-owned bytes and an exact page-aligned view sized from native geometry. Existing short/long/misaligned/overflow controls are retained, a new control covers the retired fixture ceiling, and storage tests are split into a focused module. The image catalog selects the corrected source.
Closed on completed source implementation under the testing/CI waiver. Rustfmt was applied; no test, build, CI observation or executed reproduction was performed. This closure does not close the full descriptor-readiness feature.
erikinkinen referenced this issue from erix/docs2026-10-02 15:24:50 +02:00
erikinkinen referenced this issue from erix/integration2026-10-02 15:24:51 +02:00
erikinkinen referenced this issue2026-10-02 15:24:52 +02:00
erikinkinen referenced this issue from erix/rootd2026-10-02 15:24:53 +02:00