Skip to content

Hoist UringState.enqueue's SQE fill onto an inout ring parameter - #11

Merged
coenttb merged 1 commit into
mainfrom
silgen-borrowed-base-hoist
Aug 10, 2026
Merged

Hoist UringState.enqueue's SQE fill onto an inout ring parameter#11
coenttb merged 1 commit into
mainfrom
silgen-borrowed-base-hoist

Conversation

@coenttb

@coenttb coenttb commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Consumer-lawful workaround for swift-institute/Issues#108 (Swift 6.4 release-floor SILGen assertion in Kernel_Completion.UringState.enqueue), unblocking swift-foundations/swift-linter#46's Linux release legs.

Defect: on the pinned release-floor image (swiftlang/swift@sha256:8d6141…, 6.4-dev +assertions), spelling the uring.next.entry chain on the class's stored property aborts silgen: SILGenLValue.cpp:3203, SILGenBorrowedBaseVisitor::getLookupExprBaseLValue, assertion !e->getType()->is<LValueType>() — a mutating _read (next) yielding a ~Copyable ~Escapable slot, chained through entry, on a class-ivar lvalue base. Exposure was toolchain drift (swift-institute/.github#487/#495 image pin), not source drift; reduction on the issue.

Change: delegate the instance method to a private static func enqueue(into uring: inout Kernel.IO.Uring, _:target:) — the #105 hoist pattern. Call-site spelling, guards, and semantics unchanged; +21 lines, no API change.

Evidence (local, exact pinned CI image): swift build -c release on main crashes with the identical assertion/symbol; with this change it completes, and swift test -c release passes 360 tests in 209 suites.

Removal condition: when the pinned floor toolchain no longer asserts on the class-ivar spelling (re-verify by reverting the hoist against the then-current image). No upstream filing per standing policy.

Forensic-repair lane, coordinator session 8830f961.

Spelling the uring.next.entry chain on the class's stored property trips
a SILGen assertion on the pinned Swift 6.4 release-floor toolchain
(SILGenLValue.cpp:3203, SILGenBorrowedBaseVisitor::getLookupExprBaseLValue,
!e->getType()->is<LValueType>()): the borrowed-base visitor cannot lower a
mutating _read (next) chained through a ~Copyable ~Escapable slot when the
base is a class ivar lvalue. This reddened every consumer's Linux release
leg once swift-institute/.github#487/#495 pinned the assertions-enabled
6.4 image.

Delegate the instance method to a private static enqueue(into:_:target:)
taking the ring inout. Call-site spelling, guards, and semantics are
unchanged (the #105 hoist pattern). Verified: swift build -c release in
the exact pinned CI image crashed before and completes after this change.

Tracking: swift-institute/Issues#108. Remove the hoist when the pinned
toolchain no longer asserts on the class-ivar spelling.

@swift-institute-bot swift-institute-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the #105-pattern hoist: minimal, semantics-preserving, evidence on the run (31381920572) and swift-institute/Issues#108.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant